var rrweb = function(e) {
    "use strict";
    /*! *****************************************************************************
        Copyright (c) Microsoft Corporation. All rights reserved.
        Licensed under the Apache License, Version 2.0 (the "License"); you may not use
        this file except in compliance with the License. You may obtain a copy of the
        License at http://www.apache.org/licenses/LICENSE-2.0
    
        THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
        WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
        MERCHANTABLITY OR NON-INFRINGEMENT.
    
        See the Apache Version 2.0 License for specific language governing permissions
        and limitations under the License.
        ***************************************************************************** */
    var t, n = function() {
        return (n = Object.assign || function(e) {
            for (var t, n = 1, r = arguments.length; n < r; n++)
                for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
            return e
        }).apply(this, arguments)
    };

    function r(e) {
        var t = "function" == typeof Symbol && e[Symbol.iterator],
            n = 0;
        return t ? t.call(e) : { next: function() { return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e } } }
    }

    function o(e, t) {
        var n = "function" == typeof Symbol && e[Symbol.iterator];
        if (!n) return e;
        var r, o, i = n.call(e),
            a = [];
        try {
            for (;
                (void 0 === t || t-- > 0) && !(r = i.next()).done;) a.push(r.value)
        } catch (e) { o = { error: e } } finally { try { r && !r.done && (n = i.return) && n.call(i) } finally { if (o) throw o.error } }
        return a
    }

    function i() { for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(o(arguments[t])); return e }! function(e) { e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment" }(t || (t = {}));
    var a = 1,
        s = RegExp("[^a-z1-6-]");

    function c(e) { try { var t = e.rules || e.cssRules; return t ? Array.from(t).reduce((function(e, t) { return e + (function(e) { return "styleSheet" in e }(n = t) ? c(n.styleSheet) || "" : n.cssText); var n }), "") : null } catch (e) { return null } }
    var u = /url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,
        l = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,
        d = /^(data:)([\w\/\+\-]+);(charset=[\w-]+|base64).*,(.*)/i;

    function p(e, t) {
        return (e || "").replace(u, (function(e, n, r, o) {
            var i, a = n || r || o;
            if (!a) return e;
            if (!l.test(a)) return "url('" + a + "')";
            if (d.test(a)) return "url(" + a + ")";
            if ("/" === a[0]) return "url('" + (((i = t).indexOf("//") > -1 ? i.split("/").slice(0, 3).join("/") : i.split("/")[0]).split("?")[0] + a + "')");
            var s = t.split("/"),
                c = a.split("/");
            s.pop();
            for (var u = 0, p = c; u < p.length; u++) { var f = p[u]; "." !== f && (".." === f ? s.pop() : s.push(f)) }
            return "url('" + s.join("/") + "')"
        }))
    }

    function f(e, t) { if (!t || "" === t.trim()) return t; var n = e.createElement("a"); return n.href = t, n.href }

    function h(e, t, n) { return "src" === t || "href" === t && n ? f(e, n) : "srcset" === t && n ? function(e, t) { return "" === t.trim() ? t : t.split(",").map((function(t) { var n = t.trimLeft().trimRight().split(" "); return 2 === n.length ? f(e, n[0]) + " " + n[1] : 1 === n.length ? "" + f(e, n[0]) : "" })).join(",") }(e, n) : "style" === t && n ? p(n, location.href) : n }

    function m(e, n, r, o, i) {
        switch (void 0 === i && (i = {}), e.nodeType) {
            case e.DOCUMENT_NODE:
                return { type: t.Document, childNodes: [] };
            case e.DOCUMENT_TYPE_NODE:
                return { type: t.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId };
            case e.ELEMENT_NODE:
                var a = !1;
                "string" == typeof r ? a = e.classList.contains(r) : e.classList.forEach((function(e) { r.test(e) && (a = !0) }));
                for (var u = function(e) { var t = e.toLowerCase().trim(); return s.test(t) ? "div" : t }(e.tagName), l = {}, d = 0, f = Array.from(e.attributes); d < f.length; d++) {
                    var m = f[d],
                        v = m.name,
                        y = m.value;
                    l[v] = h(n, v, y)
                }
                if ("link" === u && o) {
                    var g, b = Array.from(n.styleSheets).find((function(t) { return t.href === e.href }));
                    (g = c(b)) && (delete l.rel, delete l.href, l._cssText = p(g, b.href))
                }
                if ("style" === u && e.sheet && !(e.innerText || e.textContent || "").trim().length)(g = c(e.sheet)) && (l._cssText = p(g, location.href));
                if ("input" === u || "textarea" === u || "select" === u) { y = e.value; "radio" !== l.type && "checkbox" !== l.type && "submit" !== l.type && "button" !== l.type && y ? l.value = i[l.type] || i[u] ? "*".repeat(y.length) : y : e.checked && (l.checked = e.checked) }
                if ("option" === u) {
                    var E = e.parentElement;
                    l.value === E.value && (l.selected = e.selected)
                }
                if ("canvas" === u && (l.rr_dataURL = e.toDataURL()), "audio" !== u && "video" !== u || (l.rr_mediaState = e.paused ? "paused" : "played"), a) {
                    var S = e.getBoundingClientRect(),
                        I = S.width,
                        w = S.height;
                    l.rr_width = I + "px", l.rr_height = w + "px"
                }
                return { type: t.Element, tagName: u, attributes: l, childNodes: [], isSVG: (M = e, "svg" === M.tagName || M instanceof SVGElement || void 0), needBlock: a };
            case e.TEXT_NODE:
                var x = e.parentNode && e.parentNode.tagName,
                    T = e.textContent,
                    C = "STYLE" === x || void 0;
                return C && T && (T = p(T, location.href)), "SCRIPT" === x && (T = "SCRIPT_PLACEHOLDER"), { type: t.Text, textContent: T || "", isStyle: C };
            case e.CDATA_SECTION_NODE:
                return { type: t.CDATA, textContent: "" };
            case e.COMMENT_NODE:
                return { type: t.Comment, textContent: e.textContent || "" };
            default:
                return !1
        }
        var M
    }

    function v(e, n, r, o, i, s, c) {
        void 0 === i && (i = !1), void 0 === s && (s = !0);
        var u, l = m(e, n, o, s, c);
        if (!l) return console.warn(e, "not serialized"), null;
        u = "__sn" in e ? e.__sn.id : a++;
        var d = Object.assign(l, { id: u });
        e.__sn = d, r[u] = e;
        var p = !i;
        if (d.type === t.Element && (p = p && !d.needBlock, delete d.needBlock), (d.type === t.Document || d.type === t.Element) && p)
            for (var f = 0, h = Array.from(e.childNodes); f < h.length; f++) {
                var y = v(h[f], n, r, o, i, s, c);
                y && d.childNodes.push(y)
            }
        return d
    }
    var y = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;

    function g(e, t) {
        void 0 === t && (t = {});
        var n = 1,
            r = 1;

        function o(e) {
            var t = e.match(/\n/g);
            t && (n += t.length);
            var o = e.lastIndexOf("\n");
            r = -1 === o ? r + e.length : e.length - o
        }

        function i() { var e = { line: n, column: r }; return function(t) { return t.position = new a(e), f(), t } }
        var a = function(e) { this.start = e, this.end = { line: n, column: r }, this.source = t.source };
        a.prototype.content = e;
        var s = [];

        function c(o) {
            var i = new Error(t.source + ":" + n + ":" + r + ": " + o);
            if (i.reason = o, i.filename = t.source, i.line = n, i.column = r, i.source = e, !t.silent) throw i;
            s.push(i)
        }

        function u() { return p(/^{\s*/) }

        function l() { return p(/^}/) }

        function d() { var t, n = []; for (f(), h(n); e.length && "}" !== e.charAt(0) && (t = M() || N());) !1 !== t && (n.push(t), h(n)); return n }

        function p(t) { var n = t.exec(e); if (n) { var r = n[0]; return o(r), e = e.slice(r.length), n } }

        function f() { p(/^\s*/) }

        function h(e) { var t; for (void 0 === e && (e = []); t = m();) !1 !== t && e.push(t), t = m(); return e }

        function m() {
            var t = i();
            if ("/" === e.charAt(0) && "*" === e.charAt(1)) {
                for (var n = 2;
                    "" !== e.charAt(n) && ("*" !== e.charAt(n) || "/" !== e.charAt(n + 1));) ++n;
                if (n += 2, "" === e.charAt(n - 1)) return c("End of comment missing");
                var a = e.slice(2, n - 2);
                return r += 2, o(a), e = e.slice(n), r += 2, t({ type: "comment", comment: a })
            }
        }

        function v() { var e = p(/^([^{]+)/); if (e) return b(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, (function(e) { return e.replace(/,/g, "‌") })).split(/\s*(?![^(]*\)),\s*/).map((function(e) { return e.replace(/\u200C/g, ",") })) }

        function g() {
            var e = i(),
                t = p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
            if (t) {
                var n = b(t[0]);
                if (!p(/^:\s*/)) return c("property missing ':'");
                var r = p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),
                    o = e({ type: "declaration", property: n.replace(y, ""), value: r ? b(r[0]).replace(y, "") : "" });
                return p(/^[;\s]*/), o
            }
        }

        function E() { var e, t = []; if (!u()) return c("missing '{'"); for (h(t); e = g();) !1 !== e && (t.push(e), h(t)), e = g(); return l() ? t : c("missing '}'") }

        function S() { for (var e, t = [], n = i(); e = p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);) t.push(e[1]), p(/^,\s*/); if (t.length) return n({ type: "keyframe", values: t, declarations: E() }) }
        var I, w = C("import"),
            x = C("charset"),
            T = C("namespace");

        function C(e) {
            var t = new RegExp("^@" + e + "\\s*([^;]+);");
            return function() {
                var n = i(),
                    r = p(t);
                if (r) { var o = { type: e }; return o[e] = r[1].trim(), n(o) }
            }
        }

        function M() {
            if ("@" === e[0]) return function() {
                var e = i(),
                    t = p(/^@([-\w]+)?keyframes\s*/);
                if (t) { var n = t[1]; if (!(t = p(/^([-\w]+)\s*/))) return c("@keyframes missing name"); var r, o = t[1]; if (!u()) return c("@keyframes missing '{'"); for (var a = h(); r = S();) a.push(r), a = a.concat(h()); return l() ? e({ type: "keyframes", name: o, vendor: n, keyframes: a }) : c("@keyframes missing '}'") }
            }() || function() {
                var e = i(),
                    t = p(/^@media *([^{]+)/);
                if (t) { var n = b(t[1]); if (!u()) return c("@media missing '{'"); var r = h().concat(d()); return l() ? e({ type: "media", media: n, rules: r }) : c("@media missing '}'") }
            }() || function() {
                var e = i(),
                    t = p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
                if (t) return e({ type: "custom-media", name: b(t[1]), media: b(t[2]) })
            }() || function() {
                var e = i(),
                    t = p(/^@supports *([^{]+)/);
                if (t) { var n = b(t[1]); if (!u()) return c("@supports missing '{'"); var r = h().concat(d()); return l() ? e({ type: "supports", supports: n, rules: r }) : c("@supports missing '}'") }
            }() || w() || x() || T() || function() {
                var e = i(),
                    t = p(/^@([-\w]+)?document *([^{]+)/);
                if (t) {
                    var n = b(t[1]),
                        r = b(t[2]);
                    if (!u()) return c("@document missing '{'");
                    var o = h().concat(d());
                    return l() ? e({ type: "document", document: r, vendor: n, rules: o }) : c("@document missing '}'")
                }
            }() || function() { var e = i(); if (p(/^@page */)) { var t = v() || []; if (!u()) return c("@page missing '{'"); for (var n, r = h(); n = g();) r.push(n), r = r.concat(h()); return l() ? e({ type: "page", selectors: t, declarations: r }) : c("@page missing '}'") } }() || function() { var e = i(); if (p(/^@host\s*/)) { if (!u()) return c("@host missing '{'"); var t = h().concat(d()); return l() ? e({ type: "host", rules: t }) : c("@host missing '}'") } }() || function() { var e = i(); if (p(/^@font-face\s*/)) { if (!u()) return c("@font-face missing '{'"); for (var t, n = h(); t = g();) n.push(t), n = n.concat(h()); return l() ? e({ type: "font-face", declarations: n }) : c("@font-face missing '}'") } }()
        }

        function N() {
            var e = i(),
                t = v();
            return t ? (h(), e({ type: "rule", selectors: t, declarations: E() })) : c("selector missing")
        }
        return function e(t, n) {
            for (var r = t && "string" == typeof t.type, o = r ? t : n, i = 0, a = Object.keys(t); i < a.length; i++) {
                var s = a[i],
                    c = t[s];
                Array.isArray(c) ? c.forEach((function(t) { e(t, o) })) : c && "object" == typeof c && e(c, o)
            }
            r && Object.defineProperty(t, "parent", { configurable: !0, writable: !0, enumerable: !1, value: n || null });
            return t
        }((I = d(), { type: "stylesheet", stylesheet: { source: t.source, rules: I, parsingErrors: s } }))
    }

    function b(e) { return e ? e.replace(/^\s+|\s+$/g, "") : "" }
    var E = { script: "noscript", altglyph: "altGlyph", altglyphdef: "altGlyphDef", altglyphitem: "altGlyphItem", animatecolor: "animateColor", animatemotion: "animateMotion", animatetransform: "animateTransform", clippath: "clipPath", feblend: "feBlend", fecolormatrix: "feColorMatrix", fecomponenttransfer: "feComponentTransfer", fecomposite: "feComposite", feconvolvematrix: "feConvolveMatrix", fediffuselighting: "feDiffuseLighting", fedisplacementmap: "feDisplacementMap", fedistantlight: "feDistantLight", fedropshadow: "feDropShadow", feflood: "feFlood", fefunca: "feFuncA", fefuncb: "feFuncB", fefuncg: "feFuncG", fefuncr: "feFuncR", fegaussianblur: "feGaussianBlur", feimage: "feImage", femerge: "feMerge", femergenode: "feMergeNode", femorphology: "feMorphology", feoffset: "feOffset", fepointlight: "fePointLight", fespecularlighting: "feSpecularLighting", fespotlight: "feSpotLight", fetile: "feTile", feturbulence: "feTurbulence", foreignobject: "foreignObject", glyphref: "glyphRef", lineargradient: "linearGradient", radialgradient: "radialGradient" };
    var S, I, w, x, T, C = /([^\\]):hover/g;

    function M(e) {
        var t = g(e, { silent: !0 });
        return t.stylesheet ? (t.stylesheet.rules.forEach((function(t) {
            "selectors" in t && (t.selectors || []).forEach((function(t) {
                if (C.test(t)) {
                    var n = t.replace(C, "$1.\\:hover");
                    e = e.replace(t, t + ", " + n)
                }
            }))
        })), e) : e
    }

    function N(e, n, r) {
        switch (e.type) {
            case t.Document:
                return n.implementation.createDocument(null, "", null);
            case t.DocumentType:
                return n.implementation.createDocumentType(e.name, e.publicId, e.systemId);
            case t.Element:
                var o, i = function(e) { var t = E[e.tagName] ? E[e.tagName] : e.tagName; return "link" === t && e.attributes._cssText && (t = "style"), t }(e);
                o = e.isSVG ? n.createElementNS("http://www.w3.org/2000/svg", i) : n.createElement(i);
                var a = function(t) {
                    if (!e.attributes.hasOwnProperty(t)) return "continue";
                    var a = e.attributes[t];
                    if (a = "boolean" == typeof a ? "" : a, t.startsWith("rr_")) {
                        if ("canvas" === i && "rr_dataURL" === t) {
                            var s = document.createElement("img");
                            s.src = a, s.onload = function() {
                                var e = o.getContext("2d");
                                e && e.drawImage(s, 0, 0, s.width, s.height)
                            }
                        }
                        if ("rr_width" === t && (o.style.width = a), "rr_height" === t && (o.style.height = a), "rr_mediaState" === t) switch (a) {
                            case "played":
                                o.play();
                            case "paused":
                                o.pause()
                        }
                    } else {
                        var c = "textarea" === i && "value" === t,
                            u = "style" === i && "_cssText" === t;
                        if (u && r && (a = M(a)), c || u) {
                            for (var l = n.createTextNode(a), d = 0, p = Array.from(o.childNodes); d < p.length; d++) {
                                var f = p[d];
                                f.nodeType === o.TEXT_NODE && o.removeChild(f)
                            }
                            return o.appendChild(l), "continue"
                        }
                        if ("iframe" === i && "src" === t) return "continue";
                        try { e.isSVG && "xlink:href" === t ? o.setAttributeNS("http://www.w3.org/1999/xlink", t, a) : "onload" == t || "onclick" == t || "onmouse" == t.substring(0, 7) ? o.setAttribute("_" + t, a) : o.setAttribute(t, a) } catch (e) {}
                    }
                };
                for (var s in e.attributes) a(s);
                return o;
            case t.Text:
                return n.createTextNode(e.isStyle && r ? M(e.textContent) : e.textContent);
            case t.CDATA:
                return n.createCDATASection(e.textContent);
            case t.Comment:
                return n.createComment(e.textContent);
            default:
                return null
        }
    }

    function k(e, n, r, o, i) {
        void 0 === o && (o = !1), void 0 === i && (i = !0);
        var a = N(e, n, i);
        if (!a) return null;
        if (e.type === t.Document && (n.close(), n.open(), a = n), a.__sn = e, r[e.id] = a, (e.type === t.Document || e.type === t.Element) && !o)
            for (var s = 0, c = e.childNodes; s < c.length; s++) {
                var u = c[s],
                    l = k(u, n, r, !1, i);
                l ? a.appendChild(l) : console.warn("Failed to rebuild", u)
            }
        return a
    }

    function R(e, t, n) {
        void 0 === n && (n = document);
        var r = { capture: !0, passive: !0 };
        return n.addEventListener(e, t, r),
            function() { return n.removeEventListener(e, t, r) }
    }(S = e.EventType || (e.EventType = {}))[S.DomContentLoaded = 0] = "DomContentLoaded", S[S.Load = 1] = "Load", S[S.FullSnapshot = 2] = "FullSnapshot", S[S.IncrementalSnapshot = 3] = "IncrementalSnapshot", S[S.Meta = 4] = "Meta", S[S.Custom = 5] = "Custom", (I = e.IncrementalSource || (e.IncrementalSource = {}))[I.Mutation = 0] = "Mutation", I[I.MouseMove = 1] = "MouseMove", I[I.MouseInteraction = 2] = "MouseInteraction", I[I.Scroll = 3] = "Scroll", I[I.ViewportResize = 4] = "ViewportResize", I[I.Input = 5] = "Input", I[I.TouchMove = 6] = "TouchMove", I[I.MediaInteraction = 7] = "MediaInteraction", I[I.StyleSheetRule = 8] = "StyleSheetRule", (w = e.MouseInteractions || (e.MouseInteractions = {}))[w.MouseUp = 0] = "MouseUp", w[w.MouseDown = 1] = "MouseDown", w[w.Click = 2] = "Click", w[w.ContextMenu = 3] = "ContextMenu", w[w.DblClick = 4] = "DblClick", w[w.Focus = 5] = "Focus", w[w.Blur = 6] = "Blur", w[w.TouchStart = 7] = "TouchStart", w[w.TouchMove_Departed = 8] = "TouchMove_Departed", w[w.TouchEnd = 9] = "TouchEnd",
        function(e) { e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause" }(x || (x = {})), (T = e.ReplayerEvents || (e.ReplayerEvents = {})).Start = "start", T.Pause = "pause", T.Resume = "resume", T.Resize = "resize", T.Finish = "finish", T.FullsnapshotRebuilded = "fullsnapshot-rebuilded", T.LoadStylesheetStart = "load-stylesheet-start", T.LoadStylesheetEnd = "load-stylesheet-end", T.SkipStart = "skip-start", T.SkipEnd = "skip-end", T.MouseInteraction = "mouse-interaction", T.EventCast = "event-cast", T.CustomEvent = "custom-event", T.Flush = "flush";
    var _ = {
        map: {},
        getId: function(e) { return e.__sn ? e.__sn.id : -1 },
        getNode: function(e) { return _.map[e] || null },
        removeNodeFromMap: function(e) {
            var t = e.__sn && e.__sn.id;
            delete _.map[t], e.childNodes && e.childNodes.forEach((function(e) { return _.removeNodeFromMap(e) }))
        },
        has: function(e) { return _.map.hasOwnProperty(e) }
    };

    function O(e, t, n) {
        void 0 === n && (n = {});
        var r = null,
            o = 0;
        return function(i) {
            var a = Date.now();
            o || !1 !== n.leading || (o = a);
            var s = t - (a - o),
                c = this,
                u = arguments;
            s <= 0 || s > t ? (r && (window.clearTimeout(r), r = null), o = a, e.apply(c, u)) : r || !1 === n.trailing || (r = window.setTimeout((function() { o = !1 === n.leading ? 0 : Date.now(), r = null, e.apply(c, u) }), s))
        }
    }

    function A(e, t, n, r, o) {
        void 0 === o && (o = window);
        var i = o.Object.getOwnPropertyDescriptor(e, t);
        return o.Object.defineProperty(e, t, r ? n : {
                set: function(e) {
                    var t = this;
                    setTimeout((function() { n.set.call(t, e) }), 0), i && i.set && i.set.call(this, e)
                }
            }),
            function() { return A(e, t, i || {}, !0) }
    }

    function D() { return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight }

    function L() { return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth }

    function F(e, t) { if (!e) return !1; if (e.nodeType === e.ELEMENT_NODE) { var n = !1; return "string" == typeof t ? n = e.classList.contains(t) : e.classList.forEach((function(e) { t.test(e) && (n = !0) })), n || F(e.parentNode, t) } return e.nodeType, e.TEXT_NODE, F(e.parentNode, t) }

    function P(e) { var t = _.getId(e); return !_.has(t) || (!e.parentNode || e.parentNode.nodeType !== e.DOCUMENT_NODE) && (!e.parentNode || P(e.parentNode)) }

    function j(e) { return Boolean(e.changedTouches) }

    function z() { "NodeList" in window && !NodeList.prototype.forEach && (NodeList.prototype.forEach = Array.prototype.forEach) }

    function B(t) {
        switch (t.type) {
            case e.EventType.DomContentLoaded:
            case e.EventType.Load:
            case e.EventType.Custom:
                return !1;
            case e.EventType.FullSnapshot:
            case e.EventType.Meta:
                return !0
        }
        switch (t.data.source) {
            case e.IncrementalSource.MouseMove:
            case e.IncrementalSource.MouseInteraction:
            case e.IncrementalSource.TouchMove:
            case e.IncrementalSource.MediaInteraction:
                return !1;
            case e.IncrementalSource.ViewportResize:
            case e.IncrementalSource.StyleSheetRule:
            case e.IncrementalSource.Scroll:
            case e.IncrementalSource.Input:
                return !0
        }
        return !0
    }
    var V = function() {
            function t() { this.reset() }
            return t.prototype.add = function(e) {
                var t = this.indexes.get(e.parentId),
                    n = { id: e.node.id, mutation: e, children: [], texts: [], attributes: [] };
                t ? (n.parent = t, t.children[n.id] = n) : this.tree[n.id] = n, this.indexes.set(n.id, n)
            }, t.prototype.remove = function(e) {
                var t = this,
                    n = this.indexes.get(e.parentId),
                    r = this.indexes.get(e.id),
                    o = function(e) {
                        t.removeIdSet.add(e);
                        var n = _.getNode(e);
                        null == n || n.childNodes.forEach((function(e) { return o(e.__sn.id) }))
                    },
                    i = function(n) {
                        t.removeIdSet.add(n.id), Object.values(n.children).forEach((function(e) { return i(e) }));
                        var r = t.indexes.get(n.id);
                        if (r) {
                            var o = r.parent;
                            o && (delete r.parent, delete o.children[r.id], t.indexes.delete(e.id))
                        }
                    };
                r ? n ? (delete r.parent, delete n.children[r.id], this.indexes.delete(e.id), i(r)) : (delete this.tree[r.id], this.indexes.delete(r.id), i(r)) : (this.removeNodeMutations.push(e), o(e.id))
            }, t.prototype.text = function(e) {
                var t = this.indexes.get(e.id);
                t ? t.texts.push(e) : this.textMutations.push(e)
            }, t.prototype.attribute = function(e) {
                var t = this.indexes.get(e.id);
                t ? t.attributes.push(e) : this.attributeMutations.push(e)
            }, t.prototype.scroll = function(e) { this.scrollMap.set(e.id, e) }, t.prototype.input = function(e) { this.inputMap.set(e.id, e) }, t.prototype.flush = function() {
                var t, n, o, i, a = this,
                    s = this.tree,
                    c = this.removeNodeMutations,
                    u = this.textMutations,
                    l = this.attributeMutations,
                    d = { source: e.IncrementalSource.Mutation, removes: c, texts: u, attributes: l, adds: [] },
                    p = function(e, t) { t && a.removeIdSet.add(e.id), d.texts = d.texts.concat(t ? [] : e.texts).filter((function(e) { return !a.removeIdSet.has(e.id) })), d.attributes = d.attributes.concat(t ? [] : e.attributes).filter((function(e) { return !a.removeIdSet.has(e.id) })), a.removeIdSet.has(e.id) || a.removeIdSet.has(e.mutation.parentId) || t ? Object.values(e.children).forEach((function(e) { return p(e, !0) })) : (d.adds.push(e.mutation), e.children && Object.values(e.children).forEach((function(e) { return p(e, !1) }))) };
                Object.values(s).forEach((function(e) { return p(e, !1) }));
                try {
                    for (var f = r(this.scrollMap.keys()), h = f.next(); !h.done; h = f.next()) {
                        var m = h.value;
                        this.removeIdSet.has(m) && this.scrollMap.delete(m)
                    }
                } catch (e) { t = { error: e } } finally { try { h && !h.done && (n = f.return) && n.call(f) } finally { if (t) throw t.error } }
                try {
                    for (var v = r(this.inputMap.keys()), y = v.next(); !y.done; y = v.next()) {
                        m = y.value;
                        this.removeIdSet.has(m) && this.inputMap.delete(m)
                    }
                } catch (e) { o = { error: e } } finally { try { y && !y.done && (i = v.return) && i.call(v) } finally { if (o) throw o.error } }
                var g = new Map(this.scrollMap),
                    b = new Map(this.inputMap);
                return this.reset(), { mutationData: d, scrollMap: g, inputMap: b }
            }, t.prototype.reset = function() { this.tree = [], this.indexes = new Map, this.removeNodeMutations = [], this.textMutations = [], this.attributeMutations = [], this.removeIdSet = new Set, this.scrollMap = new Map, this.inputMap = new Map }, t
        }(),
        U = Object.freeze({
            __proto__: null,
            on: R,
            mirror: _,
            throttle: O,
            hookSetter: A,
            patch: function(e, t, n) {
                if (!(t in e)) return function() {};
                var r = e[t],
                    o = n(r);
                if ("function" == typeof o) try { o.prototype = o.prototype || {}, Object.defineProperties(o, { __rrweb_original__: { enumerable: !1, value: r } }) } catch (e) {}
                return e[t] = o,
                    function() { e[t] = r }
            },
            getWindowHeight: D,
            getWindowWidth: L,
            isBlocked: F,
            isAncestorRemoved: P,
            isTouchEvent: j,
            polyfill: z,
            needCastInSyncMode: B,
            TreeIndex: V
        }),
        Y = function(e, t) { return e + "@" + t };

    function X(e) { return "__sn" in e }
    var H = function(e, t, n, o) {
        var i = this;
        this.texts = [], this.attributes = [], this.removes = [], this.adds = [], this.movedMap = {}, this.addedSet = new Set, this.movedSet = new Set, this.droppedSet = new Set, this.processMutations = function(e) {
            var t, n, o, a;
            e.forEach(i.processMutation);
            var s = [],
                c = function(e) {
                    if (e.parentNode) {
                        var t = _.getId(e.parentNode),
                            n = e.nextSibling && _.getId(e.nextSibling);
                        if (-1 === t || -1 === n) return s.push(e);
                        i.adds.push({ parentId: t, nextId: n, node: v(e, document, _.map, i.blockClass, !0, i.inlineStylesheet, i.maskInputOptions) })
                    }
                };
            try { for (var u = r(i.movedSet), l = u.next(); !l.done; l = u.next()) c(f = l.value) } catch (e) { t = { error: e } } finally { try { l && !l.done && (n = u.return) && n.call(u) } finally { if (t) throw t.error } }
            try {
                for (var d = r(i.addedSet), p = d.next(); !p.done; p = d.next()) {
                    var f = p.value;
                    q(i.droppedSet, f) || G(i.removes, f) ? q(i.movedSet, f) ? c(f) : i.droppedSet.add(f) : c(f)
                }
            } catch (e) { o = { error: e } } finally { try { p && !p.done && (a = d.return) && a.call(d) } finally { if (o) throw o.error } }
            for (; s.length && !s.every((function(e) { return -1 === _.getId(e.parentNode) }));) c(s.shift());
            i.emit()
        }, this.emit = function() {
            var e = { texts: i.texts.map((function(e) { return { id: _.getId(e.node), value: e.value } })).filter((function(e) { return _.has(e.id) })), attributes: i.attributes.map((function(e) { return { id: _.getId(e.node), attributes: e.attributes } })).filter((function(e) { return _.has(e.id) })), removes: i.removes, adds: i.adds };
            (e.texts.length || e.attributes.length || e.removes.length || e.adds.length) && (i.emissionCallback(e), i.texts = [], i.attributes = [], i.removes = [], i.adds = [], i.addedSet = new Set, i.movedSet = new Set, i.droppedSet = new Set, i.movedMap = {})
        }, this.processMutation = function(e) {
            switch (e.type) {
                case "characterData":
                    var t = e.target.textContent;
                    F(e.target, i.blockClass) || t === e.oldValue || i.texts.push({ value: t, node: e.target });
                    break;
                case "attributes":
                    if (t = e.target.getAttribute(e.attributeName), F(e.target, i.blockClass) || t === e.oldValue) return;
                    var n = i.attributes.find((function(t) { return t.node === e.target }));
                    n || (n = { node: e.target, attributes: {} }, i.attributes.push(n)), n.attributes[e.attributeName] = h(document, e.attributeName, t);
                    break;
                case "childList":
                    e.addedNodes.forEach((function(t) { return i.genAdds(t, e.target) })), e.removedNodes.forEach((function(t) {
                        var n = _.getId(t),
                            r = _.getId(e.target);
                        F(t, i.blockClass) || F(e.target, i.blockClass) || (i.addedSet.has(t) ? (W(i.addedSet, t), i.droppedSet.add(t)) : i.addedSet.has(e.target) && -1 === n || P(e.target) || (i.movedSet.has(t) && i.movedMap[Y(n, r)] ? W(i.movedSet, t) : i.removes.push({ parentId: r, id: n })), _.removeNodeFromMap(t))
                    }))
            }
        }, this.genAdds = function(e, t) {
            if (!F(e, i.blockClass)) {
                if (X(e)) {
                    i.movedSet.add(e);
                    var n = null;
                    t && X(t) && (n = t.__sn.id), n && (i.movedMap[Y(e.__sn.id, n)] = !0)
                } else i.addedSet.add(e), i.droppedSet.delete(e);
                e.childNodes.forEach((function(e) { return i.genAdds(e) }))
            }
        }, this.blockClass = t, this.inlineStylesheet = n, this.maskInputOptions = o, this.emissionCallback = e
    };

    function W(e, t) { e.delete(t), t.childNodes.forEach((function(t) { return W(e, t) })) }

    function G(e, t) { var n = t.parentNode; if (!n) return !1; var r = _.getId(n); return !!e.some((function(e) { return e.id === r })) || G(e, n) }

    function q(e, t) { var n = t.parentNode; return !!n && (!!e.has(n) || q(e, n)) }

    function $(t, n, r) {
        if (!1 === r.mouseInteraction) return function() {};
        var o = !0 === r.mouseInteraction || void 0 === r.mouseInteraction ? {} : r.mouseInteraction,
            i = [];
        return Object.keys(e.MouseInteractions).filter((function(e) { return Number.isNaN(Number(e)) && !e.endsWith("_Departed") && !1 !== o[e] })).forEach((function(r) {
                var o = r.toLowerCase(),
                    a = function(r) {
                        return function(o) {
                            if (!F(o.target, n)) {
                                var i = _.getId(o.target),
                                    a = j(o) ? o.changedTouches[0] : o,
                                    s = a.clientX,
                                    c = a.clientY;
                                t({ type: e.MouseInteractions[r], id: i, x: s, y: c })
                            }
                        }
                    }(r);
                i.push(R(o, a))
            })),
            function() { i.forEach((function(e) { return e() })) }
    }
    var K, Z = ["INPUT", "TEXTAREA", "SELECT"],
        J = new WeakMap;

    function Q(t, r) {
        void 0 === r && (r = {}),
            function(e, t) {
                var n = e.mutationCb,
                    r = e.mousemoveCb,
                    o = e.mouseInteractionCb,
                    a = e.scrollCb,
                    s = e.viewportResizeCb,
                    c = e.inputCb,
                    u = e.mediaInteractionCb,
                    l = e.styleSheetRuleCb;
                e.mutationCb = function() {
                    for (var e = [], r = 0; r < arguments.length; r++) e[r] = arguments[r];
                    t.mutation && t.mutation.apply(t, i(e)), n.apply(void 0, i(e))
                }, e.mousemoveCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.mousemove && t.mousemove.apply(t, i(e)), r.apply(void 0, i(e))
                }, e.mouseInteractionCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.mouseInteraction && t.mouseInteraction.apply(t, i(e)), o.apply(void 0, i(e))
                }, e.scrollCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.scroll && t.scroll.apply(t, i(e)), a.apply(void 0, i(e))
                }, e.viewportResizeCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.viewportResize && t.viewportResize.apply(t, i(e)), s.apply(void 0, i(e))
                }, e.inputCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.input && t.input.apply(t, i(e)), c.apply(void 0, i(e))
                }, e.mediaInteractionCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.mediaInteaction && t.mediaInteaction.apply(t, i(e)), u.apply(void 0, i(e))
                }, e.styleSheetRuleCb = function() {
                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
                    t.styleSheetRule && t.styleSheetRule.apply(t, i(e)), l.apply(void 0, i(e))
                }
            }(t, r);
        var o, a, s, c, u, l, d = (o = t.mutationCb, a = t.blockClass, s = t.inlineStylesheet, c = t.maskInputOptions, u = new H(o, a, s, c), (l = new MutationObserver(u.processMutations)).observe(document, { attributes: !0, attributeOldValue: !0, characterData: !0, characterDataOldValue: !0, childList: !0, subtree: !0 }), l),
            p = function(t, n) {
                if (!1 === n.mousemove) return function() {};
                var r, o = "number" == typeof n.mousemove ? n.mousemove : 50,
                    i = [],
                    a = O((function(n) {
                        var o = Date.now() - r;
                        t(i.map((function(e) { return e.timeOffset -= o, e })), n ? e.IncrementalSource.TouchMove : e.IncrementalSource.MouseMove), i = [], r = null
                    }), 500),
                    s = O((function(e) {
                        var t = e.target,
                            n = j(e) ? e.changedTouches[0] : e,
                            o = n.clientX,
                            s = n.clientY;
                        r || (r = Date.now()), i.push({ x: o, y: s, id: _.getId(t), timeOffset: Date.now() - r }), a(j(e))
                    }), o, { trailing: !1 }),
                    c = [R("mousemove", s), R("touchmove", s)];
                return function() { c.forEach((function(e) { return e() })) }
            }(t.mousemoveCb, t.sampling),
            f = $(t.mouseInteractionCb, t.blockClass, t.sampling),
            h = function(e, t, n) {
                return R("scroll", O((function(n) {
                    if (n.target && !F(n.target, t)) {
                        var r = _.getId(n.target);
                        if (n.target === document) {
                            var o = document.scrollingElement || document.documentElement;
                            e({ id: r, x: o.scrollLeft, y: o.scrollTop })
                        } else e({ id: r, x: n.target.scrollLeft, y: n.target.scrollTop })
                    }
                }), n.scroll || 100))
            }(t.scrollCb, t.blockClass, t.sampling),
            m = function(e) {
                return R("resize", O((function() {
                    var t = D(),
                        n = L();
                    e({ width: Number(n), height: Number(t) })
                }), 200), window)
            }(t.viewportResizeCb),
            v = function(e, t, r, o, a) {
                function s(e) {
                    var n = e.target;
                    if (n && n.tagName && !(Z.indexOf(n.tagName) < 0) && !F(n, t)) {
                        var i = n.type;
                        if ("password" !== i && !n.classList.contains(r)) {
                            var a = n.value,
                                s = !1;
                            "radio" === i || "checkbox" === i ? s = n.checked : (o[n.tagName.toLowerCase()] || o[i]) && (a = "*".repeat(a.length)), c(n, { text: a, isChecked: s });
                            var u = n.name;
                            "radio" === i && u && s && document.querySelectorAll('input[type="radio"][name="' + u + '"]').forEach((function(e) { e !== n && c(e, { text: e.value, isChecked: !s }) }))
                        }
                    }
                }

                function c(t, r) {
                    var o = J.get(t);
                    if (!o || o.text !== r.text || o.isChecked !== r.isChecked) {
                        J.set(t, r);
                        var i = _.getId(t);
                        e(n(n({}, r), { id: i }))
                    }
                }
                var u = ("last" === a.input ? ["change"] : ["input", "change"]).map((function(e) { return R(e, s) })),
                    l = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value"),
                    d = [
                        [HTMLInputElement.prototype, "value"],
                        [HTMLInputElement.prototype, "checked"],
                        [HTMLSelectElement.prototype, "value"],
                        [HTMLTextAreaElement.prototype, "value"]
                    ];
                return l && l.set && u.push.apply(u, i(d.map((function(e) { return A(e[0], e[1], { set: function() { s({ target: this }) } }) })))),
                    function() { u.forEach((function(e) { return e() })) }
            }(t.inputCb, t.blockClass, t.ignoreClass, t.maskInputOptions, t.sampling),
            y = function(e, t) {
                var n = function(n) {
                        return function(r) {
                            var o = r.target;
                            o && !F(o, t) && e({ type: "play" === n ? x.Play : x.Pause, id: _.getId(o) })
                        }
                    },
                    r = [R("play", n("play")), R("pause", n("pause"))];
                return function() { r.forEach((function(e) { return e() })) }
            }(t.mediaInteractionCb, t.blockClass),
            g = function(e) {
                var t = CSSStyleSheet.prototype.insertRule;
                CSSStyleSheet.prototype.insertRule = function(n, r) { var o = _.getId(this.ownerNode); return -1 !== o && e({ id: o, adds: [{ rule: n, index: r }] }), t.apply(this, arguments) };
                var n = CSSStyleSheet.prototype.deleteRule;
                return CSSStyleSheet.prototype.deleteRule = function(t) { var r = _.getId(this.ownerNode); return -1 !== r && e({ id: r, removes: [{ index: t }] }), n.apply(this, arguments) },
                    function() { CSSStyleSheet.prototype.insertRule = t, CSSStyleSheet.prototype.deleteRule = n }
            }(t.styleSheetRuleCb);
        return function() { d.disconnect(), p(), f(), h(), m(), v(), y(), g() }
    }

    function ee(e) { return n(n({}, e), { timestamp: Date.now() }) }

    function te(t) {
        void 0 === t && (t = {});
        var r = t.emit,
            i = t.checkoutEveryNms,
            a = t.checkoutEveryNth,
            s = t.blockClass,
            c = void 0 === s ? "rr-block" : s,
            u = t.ignoreClass,
            l = void 0 === u ? "rr-ignore" : u,
            d = t.inlineStylesheet,
            p = void 0 === d || d,
            f = t.maskAllInputs,
            h = t.maskInputOptions,
            m = t.hooks,
            y = t.packFn,
            g = t.sampling,
            b = void 0 === g ? {} : g,
            E = t.mousemoveWait;
        if (!r) throw new Error("emit function is required");
        void 0 !== E && void 0 === b.mousemove && (b.mousemove = E);
        var S, I = !0 === f ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0, textarea: !0, select: !0 } : void 0 !== h ? h : {};
        z();
        var w = 0;

        function x(t) {
            var n, r, i, a;
            void 0 === t && (t = !1), K(ee({ type: e.EventType.Meta, data: { href: window.location.href, width: L(), height: D() } }), t);
            var s = o(function(e, t, n, r) { void 0 === t && (t = "rr-block"), void 0 === n && (n = !0); var o = {}; return [v(e, e, o, t, !1, n, !0 === r ? { color: !0, date: !0, "datetime-local": !0, email: !0, month: !0, number: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 } : !1 === r ? {} : r), o] }(document, c, p, I), 2),
                u = s[0],
                l = s[1];
            if (!u) return console.warn("Failed to snapshot the document");
            _.map = l, K(ee({ type: e.EventType.FullSnapshot, data: { node: u, initialOffset: { left: void 0 !== window.pageXOffset ? window.pageXOffset : (null === document || void 0 === document ? void 0 : document.documentElement.scrollLeft) || (null === (r = null === (n = null === document || void 0 === document ? void 0 : document.body) || void 0 === n ? void 0 : n.parentElement) || void 0 === r ? void 0 : r.scrollLeft) || (null === document || void 0 === document ? void 0 : document.body.scrollLeft) || 0, top: void 0 !== window.pageYOffset ? window.pageYOffset : (null === document || void 0 === document ? void 0 : document.documentElement.scrollTop) || (null === (a = null === (i = null === document || void 0 === document ? void 0 : document.body) || void 0 === i ? void 0 : i.parentElement) || void 0 === a ? void 0 : a.scrollTop) || (null === document || void 0 === document ? void 0 : document.body.scrollTop) || 0 } } }))
        }
        K = function(t, n) {
            if (r(y ? y(t) : t, n), t.type === e.EventType.FullSnapshot) S = t, w = 0;
            else if (t.type === e.EventType.IncrementalSnapshot) {
                w++;
                var o = a && w >= a,
                    s = i && t.timestamp - S.timestamp > i;
                (o || s) && x(!0)
            }
        };
        try {
            var T = [];
            T.push(R("DOMContentLoaded", (function() { K(ee({ type: e.EventType.DomContentLoaded, data: {} })) })));
            var C = function() { x(), T.push(Q({ mutationCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.Mutation }, t) })) }, mousemoveCb: function(t, n) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: { source: n, positions: t } })) }, mouseInteractionCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.MouseInteraction }, t) })) }, scrollCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.Scroll }, t) })) }, viewportResizeCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.ViewportResize }, t) })) }, inputCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.Input }, t) })) }, mediaInteractionCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.MediaInteraction }, t) })) }, styleSheetRuleCb: function(t) { return K(ee({ type: e.EventType.IncrementalSnapshot, data: n({ source: e.IncrementalSource.StyleSheetRule }, t) })) }, blockClass: c, ignoreClass: l, maskInputOptions: I, inlineStylesheet: p, sampling: b }, m)) };
            return "interactive" === document.readyState || "complete" === document.readyState ? C() : T.push(R("load", (function() { K(ee({ type: e.EventType.Load, data: {} })), C() }), window)),
                function() { T.forEach((function(e) { return e() })) }
        } catch (e) { console.warn(e) }
    }

    function ne(e) {
        return e = e || Object.create(null), {
            on: function(t, n) {
                (e[t] || (e[t] = [])).push(n)
            },
            off: function(t, n) { e[t] && e[t].splice(e[t].indexOf(n) >>> 0, 1) },
            emit: function(t, n) {
                (e[t] || []).slice().map((function(e) { e(n) })), (e["*"] || []).slice().map((function(e) { e(t, n) }))
            }
        }
    }
    te.addCustomEvent = function(t, n) {
        if (!K) throw new Error("please add custom event after start recording");
        K(ee({ type: e.EventType.Custom, data: { tag: t, payload: n } }))
    };
    var re = Object.freeze({ __proto__: null, default: ne });
    var oe, ie = function(e, t) { return e(t = { exports: {} }, t.exports), t.exports }((function(e, t) {
            e.exports = {
                polyfill: function() {
                    var e = window,
                        t = document;
                    if (!("scrollBehavior" in t.documentElement.style) || !0 === e.__forceSmoothScrollPolyfill__) {
                        var n, r = e.HTMLElement || e.Element,
                            o = { scroll: e.scroll || e.scrollTo, scrollBy: e.scrollBy, elementScroll: r.prototype.scroll || s, scrollIntoView: r.prototype.scrollIntoView },
                            i = e.performance && e.performance.now ? e.performance.now.bind(e.performance) : Date.now,
                            a = (n = e.navigator.userAgent, new RegExp(["MSIE ", "Trident/", "Edge/"].join("|")).test(n) ? 1 : 0);
                        e.scroll = e.scrollTo = function() { void 0 !== arguments[0] && (!0 !== c(arguments[0]) ? h.call(e, t.body, void 0 !== arguments[0].left ? ~~arguments[0].left : e.scrollX || e.pageXOffset, void 0 !== arguments[0].top ? ~~arguments[0].top : e.scrollY || e.pageYOffset) : o.scroll.call(e, void 0 !== arguments[0].left ? arguments[0].left : "object" != typeof arguments[0] ? arguments[0] : e.scrollX || e.pageXOffset, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : e.scrollY || e.pageYOffset)) }, e.scrollBy = function() { void 0 !== arguments[0] && (c(arguments[0]) ? o.scrollBy.call(e, void 0 !== arguments[0].left ? arguments[0].left : "object" != typeof arguments[0] ? arguments[0] : 0, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : 0) : h.call(e, t.body, ~~arguments[0].left + (e.scrollX || e.pageXOffset), ~~arguments[0].top + (e.scrollY || e.pageYOffset))) }, r.prototype.scroll = r.prototype.scrollTo = function() {
                            if (void 0 !== arguments[0])
                                if (!0 !== c(arguments[0])) {
                                    var e = arguments[0].left,
                                        t = arguments[0].top;
                                    h.call(this, this, void 0 === e ? this.scrollLeft : ~~e, void 0 === t ? this.scrollTop : ~~t)
                                } else {
                                    if ("number" == typeof arguments[0] && void 0 === arguments[1]) throw new SyntaxError("Value could not be converted");
                                    o.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left : "object" != typeof arguments[0] ? ~~arguments[0] : this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top : void 0 !== arguments[1] ? ~~arguments[1] : this.scrollTop)
                                }
                        }, r.prototype.scrollBy = function() { void 0 !== arguments[0] && (!0 !== c(arguments[0]) ? this.scroll({ left: ~~arguments[0].left + this.scrollLeft, top: ~~arguments[0].top + this.scrollTop, behavior: arguments[0].behavior }) : o.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop)) }, r.prototype.scrollIntoView = function() {
                            if (!0 !== c(arguments[0])) {
                                var n = p(this),
                                    r = n.getBoundingClientRect(),
                                    i = this.getBoundingClientRect();
                                n !== t.body ? (h.call(this, n, n.scrollLeft + i.left - r.left, n.scrollTop + i.top - r.top), "fixed" !== e.getComputedStyle(n).position && e.scrollBy({ left: r.left, top: r.top, behavior: "smooth" })) : e.scrollBy({ left: i.left, top: i.top, behavior: "smooth" })
                            } else o.scrollIntoView.call(this, void 0 === arguments[0] || arguments[0])
                        }
                    }

                    function s(e, t) { this.scrollLeft = e, this.scrollTop = t }

                    function c(e) { if (null === e || "object" != typeof e || void 0 === e.behavior || "auto" === e.behavior || "instant" === e.behavior) return !0; if ("object" == typeof e && "smooth" === e.behavior) return !1; throw new TypeError("behavior member of ScrollOptions " + e.behavior + " is not a valid value for enumeration ScrollBehavior.") }

                    function u(e, t) { return "Y" === t ? e.clientHeight + a < e.scrollHeight : "X" === t ? e.clientWidth + a < e.scrollWidth : void 0 }

                    function l(t, n) { var r = e.getComputedStyle(t, null)["overflow" + n]; return "auto" === r || "scroll" === r }

                    function d(e) {
                        var t = u(e, "Y") && l(e, "Y"),
                            n = u(e, "X") && l(e, "X");
                        return t || n
                    }

                    function p(e) { for (; e !== t.body && !1 === d(e);) e = e.parentNode || e.host; return e }

                    function f(t) {
                        var n, r, o, a, s = (i() - t.startTime) / 468;
                        a = s = s > 1 ? 1 : s, n = .5 * (1 - Math.cos(Math.PI * a)), r = t.startX + (t.x - t.startX) * n, o = t.startY + (t.y - t.startY) * n, t.method.call(t.scrollable, r, o), r === t.x && o === t.y || e.requestAnimationFrame(f.bind(e, t))
                    }

                    function h(n, r, a) {
                        var c, u, l, d, p = i();
                        n === t.body ? (c = e, u = e.scrollX || e.pageXOffset, l = e.scrollY || e.pageYOffset, d = o.scroll) : (c = n, u = n.scrollLeft, l = n.scrollTop, d = s), f({ scrollable: c, method: d, startTime: p, startX: u, startY: l, x: r, y: a })
                    }
                }
            }
        })).polyfill,
        ae = function() {
            function e(e, t) { void 0 === t && (t = []), this.timeOffset = 0, this.actions = t, this.config = e }
            return e.prototype.addAction = function(e) {
                var t = this.findActionIndex(e);
                this.actions.splice(t, 0, e)
            }, e.prototype.addActions = function(e) {
                var t;
                (t = this.actions).push.apply(t, i(e))
            }, e.prototype.start = function() {
                this.actions.sort((function(e, t) { return e.delay - t.delay })), this.timeOffset = 0;
                var e = performance.now(),
                    t = this.actions,
                    n = this.config,
                    r = this;
                this.raf = requestAnimationFrame((function o(i) {
                    for (r.timeOffset += (i - e) * n.speed, e = i; t.length;) {
                        var a = t[0];
                        if (!(r.timeOffset >= a.delay)) break;
                        t.shift(), a.doAction()
                    }(t.length > 0 || r.config.liveMode) && (r.raf = requestAnimationFrame(o))
                }))
            }, e.prototype.clear = function() { this.raf && cancelAnimationFrame(this.raf), this.actions.length = 0 }, e.prototype.findActionIndex = function(e) {
                for (var t = 0, n = this.actions.length - 1; t <= n;) {
                    var r = Math.floor((t + n) / 2);
                    if (this.actions[r].delay < e.delay) t = r + 1;
                    else {
                        if (!(this.actions[r].delay > e.delay)) return r;
                        n = r - 1
                    }
                }
                return t
            }, e
        }();

    function se(t, n) {
        if (t.type === e.EventType.IncrementalSnapshot && t.data.source === e.IncrementalSource.MouseMove) {
            var r = t.data.positions[0].timeOffset,
                o = t.timestamp + r;
            return t.delay = o - n, o - n
        }
        return t.delay = t.timestamp - n, t.timestamp - n
    }
    /*! *****************************************************************************
        Copyright (c) Microsoft Corporation. All rights reserved.
        Licensed under the Apache License, Version 2.0 (the "License"); you may not use
        this file except in compliance with the License. You may obtain a copy of the
        License at http://www.apache.org/licenses/LICENSE-2.0
    
        THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
        WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
        MERCHANTABLITY OR NON-INFRINGEMENT.
    
        See the Apache Version 2.0 License for specific language governing permissions
        and limitations under the License.
        ***************************************************************************** */
    ! function(e) { e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped" }(oe || (oe = {}));
    var ce = { type: "xstate.init" };

    function ue(e) { return void 0 === e ? [] : [].concat(e) }

    function le(e) { return { type: "xstate.assign", assignment: e } }

    function de(e, t) { return "string" == typeof(e = "string" == typeof e && t && t[e] ? t[e] : e) ? { type: e } : "function" == typeof e ? { type: e.name, exec: e } : e }

    function pe(e) { return function(t) { return e === t } }

    function fe(e) { return "string" == typeof e ? { type: e } : e }

    function he(e, t) { return { value: e, context: t, actions: [], changed: !1, matches: pe(e) } }
    var me = function(e, t) { return e.actions.forEach((function(n) { var r = n.exec; return r && r(e.context, t) })) };

    function ve(t, o) {
        var i = o.getCastFn,
            a = o.emitter;
        return function(e) {
            var t = e.initialState,
                n = oe.NotStarted,
                r = new Set,
                o = { _machine: e, send: function(o) { n === oe.Running && (t = e.transition(t, o), me(t, fe(o)), r.forEach((function(e) { return e(t) }))) }, subscribe: function(e) { return r.add(e), e(t), { unsubscribe: function() { return r.delete(e) } } }, start: function() { return n = oe.Running, me(t, ce), o }, stop: function() { return n = oe.Stopped, r.clear(), o }, get state() { return t }, get status() { return n } };
            return o
        }(function(e, t) {
            void 0 === t && (t = {});
            var n = {
                config: e,
                _options: t,
                initialState: { value: e.initial, actions: ue(e.states[e.initial].entry).map((function(e) { return de(e, t.actions) })), context: e.context, matches: pe(e.initial) },
                transition: function(t, r) {
                    var o, i, a = "string" == typeof t ? { value: t, context: e.context } : t,
                        s = a.value,
                        c = a.context,
                        u = fe(r),
                        l = e.states[s];
                    if (l.on) {
                        var d = ue(l.on[u.type]),
                            p = function(t) {
                                if (void 0 === t) return { value: he(s, c) };
                                var r = "string" == typeof t ? { target: t } : t,
                                    o = r.target,
                                    i = void 0 === o ? s : o,
                                    a = r.actions,
                                    d = void 0 === a ? [] : a,
                                    p = r.cond,
                                    f = c;
                                if ((void 0 === p ? function() { return !0 } : p)(c, u)) {
                                    var h = e.states[i],
                                        m = !1,
                                        v = [].concat(l.exit, d, h.entry).filter((function(e) { return e })).map((function(e) { return de(e, n._options.actions) })).filter((function(e) { if ("xstate.assign" === e.type) { m = !0; var t = Object.assign({}, f); return "function" == typeof e.assignment ? t = e.assignment(f, u) : Object.keys(e.assignment).forEach((function(n) { t[n] = "function" == typeof e.assignment[n] ? e.assignment[n](f, u) : e.assignment[n] })), f = t, !1 } return !0 }));
                                    return { value: { value: i, context: f, actions: v, changed: i !== s || v.length > 0 || m, matches: pe(i) } }
                                }
                            };
                        try {
                            for (var f = function(e) {
                                    var t = "function" == typeof Symbol && e[Symbol.iterator],
                                        n = 0;
                                    return t ? t.call(e) : { next: function() { return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e } } }
                                }(d), h = f.next(); !h.done; h = f.next()) { var m = p(h.value); if ("object" == typeof m) return m.value }
                        } catch (e) { o = { error: e } } finally { try { h && !h.done && (i = f.return) && i.call(f) } finally { if (o) throw o.error } }
                    }
                    return he(s, c)
                }
            };
            return n
        }({ id: "player", context: t, initial: "inited", states: { inited: { on: { PLAY: { target: "playing", actions: ["recordTimeOffset", "play"] }, TO_LIVE: { target: "live", actions: ["startLive"] } } }, playing: { on: { PAUSE: { target: "paused", actions: ["pause"] }, END: "ended", FAST_FORWARD: "skipping", CAST_EVENT: { target: "playing", actions: "castEvent" } } }, paused: { on: { RESUME: { target: "playing", actions: ["recordTimeOffset", "play"] }, CAST_EVENT: { target: "paused", actions: "castEvent" } } }, skipping: { on: { BACK_TO_NORMAL: "playing" } }, ended: { on: { REPLAY: "playing" } }, live: { on: { ADD_EVENT: { target: "live", actions: ["addEvent"] } } } } }, {
            actions: {
                castEvent: le({ lastPlayedEvent: function(e, n) { return "CAST_EVENT" === n.type ? n.payload.event : t.lastPlayedEvent } }),
                recordTimeOffset: le((function(e, t) { var r = e.timeOffset; return "payload" in t && "timeOffset" in t.payload && (r = t.payload.timeOffset), n(n({}, e), { timeOffset: r, baselineTime: e.events[0].timestamp + r }) })),
                play: function(t) {
                    var n, o, s = t.timer,
                        c = t.events,
                        u = t.baselineTime,
                        l = t.lastPlayedEvent;
                    s.clear();
                    var d = function(t, n) { for (var r = t.length - 1; r >= 0; r--) { var o = t[r]; if (o.type === e.EventType.Meta && o.timestamp <= n) return t.slice(r) } return t }(c, u),
                        p = new Array,
                        f = function(t) {
                            if (l && l.timestamp > u && (t.timestamp <= l.timestamp || t === l)) return "continue";
                            var n = t.timestamp < u;
                            if (n && !B(t)) return "continue";
                            var r = i(t, n);
                            n ? r() : p.push({ doAction: function() { r(), a.emit(e.ReplayerEvents.EventCast, t) }, delay: se(t, u) })
                        };
                    try { for (var h = r(d), m = h.next(); !m.done; m = h.next()) { f(m.value) } } catch (e) { n = { error: e } } finally { try { m && !m.done && (o = h.return) && o.call(h) } finally { if (n) throw n.error } }
                    a.emit(e.ReplayerEvents.Flush), s.addActions(p), s.start()
                },
                pause: function(e) { e.timer.clear() },
                startLive: le({ baselineTime: function(e, t) { return e.timer.start(), "TO_LIVE" === t.type && t.payload.baselineTime ? t.payload.baselineTime : Date.now() } }),
                addEvent: le((function(t, r) {
                    var o = t.baselineTime,
                        s = t.timer,
                        c = t.events;
                    if ("ADD_EVENT" === r.type) {
                        var u = r.payload.event;
                        c.push(u);
                        var l = u.timestamp < o,
                            d = i(u, l);
                        l ? d() : s.addAction({ doAction: function() { d(), a.emit(e.ReplayerEvents.EventCast, u) }, delay: se(u, o) })
                    }
                    return n(n({}, t), { events: c })
                }))
            }
        }))
    }
    var ye = ne || re,
        ge = { speed: 1, root: document.body, loadTimeout: 0, skipInactive: !1, showWarning: !0, showDebug: !1, blockClass: "rr-block", liveMode: !1, insertStyleRules: [], triggerFocus: !0 },
        be = function() {
            function i(n, i) {
                var a = this;
                if (this.emitter = ye(), this.noramlSpeed = -1, this.legacy_missingNodeRetryMap = {}, !(null == i ? void 0 : i.liveMode) && n.length < 2) throw new Error("Replayer need at least 2 events.");
                this.config = Object.assign({}, ge, i), this.handleResize = this.handleResize.bind(this), this.getCastFn = this.getCastFn.bind(this), this.emitter.on(e.ReplayerEvents.Resize, this.handleResize), ie(), z(), this.setupDom(), this.treeIndex = new V, this.fragmentParentMap = new Map, this.emitter.on(e.ReplayerEvents.Flush, (function() {
                    var e, n, i, s, c, u, l = a.treeIndex.flush(),
                        d = l.scrollMap,
                        p = l.inputMap;
                    try {
                        for (var f = r(d.values()), h = f.next(); !h.done; h = f.next()) {
                            var m = h.value;
                            a.applyScroll(m)
                        }
                    } catch (t) { e = { error: t } } finally { try { h && !h.done && (n = f.return) && n.call(f) } finally { if (e) throw e.error } }
                    try {
                        for (var v = r(p.values()), y = v.next(); !y.done; y = v.next()) {
                            m = y.value;
                            a.applyInput(m)
                        }
                    } catch (e) { i = { error: e } } finally { try { y && !y.done && (s = v.return) && s.call(v) } finally { if (i) throw i.error } }
                    try {
                        for (var g = r(a.fragmentParentMap.entries()), b = g.next(); !b.done; b = g.next()) {
                            var E = o(b.value, 2),
                                S = E[0],
                                I = E[1];
                            _.map[I.__sn.id] = I, I.__sn.type === t.Element && "textarea" === I.__sn.tagName && S.textContent && (I.value = S.textContent), I.appendChild(S)
                        }
                    } catch (e) { c = { error: e } } finally { try { b && !b.done && (u = g.return) && u.call(g) } finally { if (c) throw c.error } }
                    a.fragmentParentMap.clear()
                })), this.service = ve({ events: n.map((function(e) { return i && i.unpackFn ? i.unpackFn(e) : e })), timer: new ae(this.config), speed: (null == i ? void 0 : i.speed) || ge.speed, timeOffset: 0, baselineTime: 0, lastPlayedEvent: null }, { getCastFn: this.getCastFn, emitter: this.emitter }), this.service.start(), this.service.subscribe((function(e) { e.changed }));
                var s = this.service.state.context.events,
                    c = s.find((function(t) { return t.type === e.EventType.Meta })),
                    u = s.find((function(t) { return t.type === e.EventType.FullSnapshot }));
                if (c) {
                    var l = c.data,
                        d = l.width,
                        p = l.height;
                    this.emitter.emit(e.ReplayerEvents.Resize, { width: d, height: p })
                }
                u && this.rebuildFullSnapshot(u)
            }
            return Object.defineProperty(i.prototype, "timer", { get: function() { return this.service.state.context.timer }, enumerable: !1, configurable: !0 }), i.prototype.on = function(e, t) { this.emitter.on(e, t) }, i.prototype.setConfig = function(e) {
                var t = this;
                Object.keys(e).forEach((function(n) { t.config[n] = e[n] })), this.config.skipInactive || (this.noramlSpeed = -1)
            }, i.prototype.getMetaData = function() {
                var e = this.service.state.context.events,
                    t = e[0],
                    n = e[e.length - 1];
                return { startTime: t.timestamp, endTime: n.timestamp, totalTime: n.timestamp - t.timestamp }
            }, i.prototype.getCurrentTime = function() { return this.timer.timeOffset + this.getTimeOffset() }, i.prototype.getTimeOffset = function() { var e = this.service.state.context; return e.baselineTime - e.events[0].timestamp }, i.prototype.play = function(t) { void 0 === t && (t = 0), "ended" === this.service.state.value && this.service.send({ type: "REPLAY" }), "paused" === this.service.state.value ? this.service.send({ type: "RESUME", payload: { timeOffset: t } }) : this.service.send({ type: "PLAY", payload: { timeOffset: t } }), this.emitter.emit(e.ReplayerEvents.Start) }, i.prototype.pause = function() { this.service.send({ type: "PAUSE" }), this.emitter.emit(e.ReplayerEvents.Pause) }, i.prototype.resume = function(t) { void 0 === t && (t = 0), this.service.send({ type: "RESUME", payload: { timeOffset: t } }), this.emitter.emit(e.ReplayerEvents.Resume) }, i.prototype.startLive = function(e) { this.service.send({ type: "TO_LIVE", payload: { baselineTime: e } }) }, i.prototype.addEvent = function(e) {
                var t = this,
                    n = this.config.unpackFn ? this.config.unpackFn(e) : e;
                Promise.resolve().then((function() { return t.service.send({ type: "ADD_EVENT", payload: { event: n } }) }))
            }, i.prototype.enableInteract = function() { this.iframe.setAttribute("scrolling", "auto"), this.iframe.style.pointerEvents = "auto" }, i.prototype.disableInteract = function() { this.iframe.setAttribute("scrolling", "no"), this.iframe.style.pointerEvents = "none" }, i.prototype.setupDom = function() { this.wrapper = document.createElement("div"), this.wrapper.classList.add("replayer-wrapper"), this.config.root.appendChild(this.wrapper), this.mouse = document.createElement("div"), this.mouse.classList.add("replayer-mouse"), this.wrapper.appendChild(this.mouse), this.iframe = document.createElement("iframe"), this.iframe.setAttribute("sandbox", "allow-same-origin"), this.disableInteract(), this.wrapper.appendChild(this.iframe) }, i.prototype.handleResize = function(e) { this.iframe.setAttribute("width", String(e.width)), this.iframe.setAttribute("height", String(e.height)) }, i.prototype.getCastFn = function(t, n) {
                var o = this;
                void 0 === n && (n = !1);
                var i, a = this.service.state.context.events;
                switch (t.type) {
                    case e.EventType.DomContentLoaded:
                    case e.EventType.Load:
                        break;
                    case e.EventType.Custom:
                        i = function() { o.emitter.emit(e.ReplayerEvents.CustomEvent, t) };
                        break;
                    case e.EventType.Meta:
                        i = function() { return o.emitter.emit(e.ReplayerEvents.Resize, { width: t.data.width, height: t.data.height }) };
                        break;
                    case e.EventType.FullSnapshot:
                        i = function() { o.rebuildFullSnapshot(t), o.iframe.contentWindow.scrollTo(t.data.initialOffset) };
                        break;
                    case e.EventType.IncrementalSnapshot:
                        i = function() {
                            var i, s;
                            if (o.applyIncremental(t, n), t === o.nextUserInteractionEvent && (o.nextUserInteractionEvent = null, o.restoreSpeed()), o.config.skipInactive && !o.nextUserInteractionEvent) {
                                try { for (var c = r(a), u = c.next(); !u.done; u = c.next()) { var l = u.value; if (!(l.timestamp <= t.timestamp) && o.isUserInteraction(l)) { l.delay - t.delay > 1e4 * o.config.speed && (o.nextUserInteractionEvent = l); break } } } catch (e) { i = { error: e } } finally { try { u && !u.done && (s = c.return) && s.call(c) } finally { if (i) throw i.error } }
                                if (o.nextUserInteractionEvent) {
                                    o.noramlSpeed = o.config.speed;
                                    var d = o.nextUserInteractionEvent.delay - t.delay,
                                        p = { speed: Math.min(Math.round(d / 5e3), 360) };
                                    o.setConfig(p), o.emitter.emit(e.ReplayerEvents.SkipStart, p)
                                }
                            }
                        }
                }
                return function() { i && i(), o.service.send({ type: "CAST_EVENT", payload: { event: t } }), t === a[a.length - 1] && (o.restoreSpeed(), o.service.send("END"), o.emitter.emit(e.ReplayerEvents.Finish)) }
            }, i.prototype.rebuildFullSnapshot = function(t) {
                if (!this.iframe.contentDocument) return console.warn("Looks like your replayer has been destroyed.");
                Object.keys(this.legacy_missingNodeRetryMap).length && console.warn("Found unresolved missing node map", this.legacy_missingNodeRetryMap), this.legacy_missingNodeRetryMap = {}, _.map = function(e, t, n) { void 0 === n && (n = !0); var r = {}; return [k(e, t, r, !1, n), r] }(t.data.node, this.iframe.contentDocument)[1];
                var n = document.createElement("style"),
                    r = this.iframe.contentDocument,
                    o = r.documentElement,
                    i = r.head;
                o.insertBefore(n, i);
                for (var a, s = (a = this.config.blockClass, ["iframe, ." + a + " { background: #ccc }", "noscript { display: none !important; }"]).concat(this.config.insertStyleRules), c = 0; c < s.length; c++) n.sheet.insertRule(s[c], c);
                this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded, t), this.waitForStylesheetLoad()
            }, i.prototype.waitForStylesheetLoad = function() {
                var t, n = this,
                    r = null === (t = this.iframe.contentDocument) || void 0 === t ? void 0 : t.head;
                if (r) {
                    var o, i = new Set,
                        a = this.service.state;
                    r.querySelectorAll('link[rel="stylesheet"]').forEach((function(t) { t.sheet || (i.add(t), t.addEventListener("load", (function() { i.delete(t), 0 === i.size && -1 !== o && (a.matches("playing") && n.resume(n.getCurrentTime()), n.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd), o && window.clearTimeout(o)) }))) })), i.size > 0 && (this.service.send({ type: "PAUSE" }), this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart), o = window.setTimeout((function() { a.matches("playing") && n.resume(n.getCurrentTime()), o = -1 }), this.config.loadTimeout))
                }
            }, i.prototype.applyIncremental = function(t, n) {
                var r = this,
                    o = this.service.state.context.baselineTime,
                    i = t.data;
                switch (i.source) {
                    case e.IncrementalSource.Mutation:
                        n && (i.adds.forEach((function(e) { return r.treeIndex.add(e) })), i.texts.forEach((function(e) { return r.treeIndex.text(e) })), i.attributes.forEach((function(e) { return r.treeIndex.attribute(e) })), i.removes.forEach((function(e) { return r.treeIndex.remove(e) }))), this.applyMutation(i, n);
                        break;
                    case e.IncrementalSource.MouseMove:
                        if (n) {
                            var a = i.positions[i.positions.length - 1];
                            this.moveAndHover(i, a.x, a.y, a.id)
                        } else i.positions.forEach((function(e) {
                            var n = { doAction: function() { r.moveAndHover(i, e.x, e.y, e.id) }, delay: e.timeOffset + t.timestamp - o };
                            r.timer.addAction(n)
                        }));
                        break;
                    case e.IncrementalSource.MouseInteraction:
                        if (-1 === i.id) break;
                        var s = new Event(e.MouseInteractions[i.type].toLowerCase());
                        if (!(l = _.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        this.emitter.emit(e.ReplayerEvents.MouseInteraction, { type: i.type, target: l });
                        var c = this.config.triggerFocus;
                        switch (i.type) {
                            case e.MouseInteractions.Blur:
                                "blur" in l && l.blur();
                                break;
                            case e.MouseInteractions.Focus:
                                c && l.focus && l.focus({ preventScroll: !0 });
                                break;
                            case e.MouseInteractions.Click:
                            case e.MouseInteractions.TouchStart:
                            case e.MouseInteractions.TouchEnd:
                                n || (this.moveAndHover(i, i.x, i.y, i.id), this.mouse.classList.remove("active"), this.mouse.offsetWidth, this.mouse.classList.add("active"));
                                break;
                            default:
                                l.dispatchEvent(s)
                        }
                        break;
                    case e.IncrementalSource.Scroll:
                        if (-1 === i.id) break;
                        if (n) { this.treeIndex.scroll(i); break }
                        this.applyScroll(i);
                        break;
                    case e.IncrementalSource.ViewportResize:
                        this.emitter.emit(e.ReplayerEvents.Resize, { width: i.width, height: i.height });
                        break;
                    case e.IncrementalSource.Input:
                        if (-1 === i.id) break;
                        if (n) { this.treeIndex.input(i); break }
                        this.applyInput(i);
                        break;
                    case e.IncrementalSource.MediaInteraction:
                        if (!(l = _.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        var u = l;
                        i.type === x.Pause && u.pause(), i.type === x.Play && (u.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA ? u.play() : u.addEventListener("canplay", (function() { u.play() })));
                        break;
                    case e.IncrementalSource.StyleSheetRule:
                        var l;
                        if (!(l = _.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        var d = l.sheet;
                        i.adds && i.adds.forEach((function(e) {
                            var t = e.rule,
                                n = e.index,
                                r = void 0 === n ? void 0 : Math.min(n, d.rules.length);
                            try { d.insertRule(t, r) } catch (e) {}
                        })), i.removes && i.removes.forEach((function(e) {
                            var t = e.index;
                            d.deleteRule(t)
                        }))
                }
            }, i.prototype.applyMutation = function(e, t) {
                var r = this;
                e.removes.forEach((function(t) {
                    var n = _.getNode(t.id);
                    if (!n) return r.warnNodeNotFound(e, t.id);
                    var o = _.getNode(t.parentId);
                    if (!o) return r.warnNodeNotFound(e, t.parentId);
                    if (_.removeNodeFromMap(n), o) {
                        var i = r.fragmentParentMap.get(o);
                        i && i.contains(n) ? i.removeChild(n) : o.removeChild(n)
                    }
                }));
                var o = n({}, this.legacy_missingNodeRetryMap),
                    i = [],
                    a = function(e) {
                        if (!r.iframe.contentDocument) return console.warn("Looks like your replayer has been destroyed.");
                        var n = _.getNode(e.parentId);
                        if (!n) return i.push(e);
                        var a = r.iframe.contentDocument.contains(n);
                        if (t && a) {
                            var s = document.createDocumentFragment();
                            for (_.map[e.parentId] = s, r.fragmentParentMap.set(s, n); n.firstChild;) s.appendChild(n.firstChild);
                            n = s
                        }
                        var c = null,
                            u = null;
                        if (e.previousId && (c = _.getNode(e.previousId)), e.nextId && (u = _.getNode(e.nextId)), null !== e.nextId && -1 !== e.nextId && !u) return i.push(e);
                        var l = k(e.node, r.iframe.contentDocument, _.map, !0); - 1 !== e.previousId && -1 !== e.nextId ? (c && c.nextSibling && c.nextSibling.parentNode ? n.insertBefore(l, c.nextSibling) : u && u.parentNode ? n.contains(u) ? n.insertBefore(l, u) : n.insertBefore(l, null) : n.appendChild(l), (e.previousId || e.nextId) && r.legacy_resolveMissingNode(o, n, l, e)) : o[e.node.id] = { node: l, mutation: e }
                    };
                for (e.adds.forEach((function(e) { a(e) })); i.length;) {
                    if (i.every((function(e) { return !Boolean(_.getNode(e.parentId)) }))) return i.forEach((function(t) { return r.warnNodeNotFound(e, t.node.id) }));
                    var s = i.shift();
                    a(s)
                }
                Object.keys(o).length && Object.assign(this.legacy_missingNodeRetryMap, o), e.texts.forEach((function(t) {
                    var n = _.getNode(t.id);
                    if (!n) return r.warnNodeNotFound(e, t.id);
                    r.fragmentParentMap.has(n) && (n = r.fragmentParentMap.get(n)), n.textContent = t.value
                })), e.attributes.forEach((function(t) {
                    var n = _.getNode(t.id);
                    if (!n) return r.warnNodeNotFound(e, t.id);
                    for (var o in r.fragmentParentMap.has(n) && (n = r.fragmentParentMap.get(n)), t.attributes)
                        if ("string" == typeof o) {
                            var i = t.attributes[o];
                            null !== i ? n.setAttribute(o, i) : n.removeAttribute(o)
                        }
                }))
            }, i.prototype.applyScroll = function(e) {
                var t = _.getNode(e.id);
                if (!t) return this.debugNodeNotFound(e, e.id);
                if (t === this.iframe.contentDocument) this.iframe.contentWindow.scrollTo({ top: e.y, left: e.x, behavior: "smooth" });
                else try { t.scrollTop = e.y, t.scrollLeft = e.x } catch (e) {}
            }, i.prototype.applyInput = function(e) { var t = _.getNode(e.id); if (!t) return this.debugNodeNotFound(e, e.id); try { t.checked = e.isChecked, t.value = e.text } catch (e) {} }, i.prototype.legacy_resolveMissingNode = function(e, t, n, r) {
                var o = r.previousId,
                    i = r.nextId,
                    a = o && e[o],
                    s = i && e[i];
                if (a) {
                    var c = a,
                        u = c.node,
                        l = c.mutation;
                    t.insertBefore(u, n), delete e[l.node.id], delete this.legacy_missingNodeRetryMap[l.node.id], (l.previousId || l.nextId) && this.legacy_resolveMissingNode(e, t, u, l)
                }
                if (s) {
                    var d = s;
                    u = d.node, l = d.mutation;
                    t.insertBefore(u, n.nextSibling), delete e[l.node.id], delete this.legacy_missingNodeRetryMap[l.node.id], (l.previousId || l.nextId) && this.legacy_resolveMissingNode(e, t, u, l)
                }
            }, i.prototype.moveAndHover = function(e, t, n, r) {
                this.mouse.style.left = t + "px", this.mouse.style.top = n + "px";
                var o = _.getNode(r);
                if (!o) return this.debugNodeNotFound(e, r);
                this.hoverElements(o)
            }, i.prototype.hoverElements = function(e) {
                var t;
                null === (t = this.iframe.contentDocument) || void 0 === t || t.querySelectorAll(".\\:hover").forEach((function(e) { e.classList.remove(":hover") }));
                for (var n = e; n;) n.classList && n.classList.add(":hover"), n = n.parentElement
            }, i.prototype.isUserInteraction = function(t) { return t.type === e.EventType.IncrementalSnapshot && (t.data.source > e.IncrementalSource.Mutation && t.data.source <= e.IncrementalSource.Input) }, i.prototype.restoreSpeed = function() {
                if (-1 !== this.noramlSpeed) {
                    var t = { speed: this.noramlSpeed };
                    this.setConfig(t), this.emitter.emit(e.ReplayerEvents.SkipEnd, t), this.noramlSpeed = -1
                }
            }, i.prototype.warnNodeNotFound = function(e, t) { this.config.showWarning && console.warn("[replayer]", "Node with id '" + t + "' not found in", e) }, i.prototype.debugNodeNotFound = function(e, t) { this.config.showDebug && console.log("[replayer]", "Node with id '" + t + "' not found in", e) }, i
        }(),
        Ee = te.addCustomEvent;
    return e.Replayer = be, e.addCustomEvent = Ee, e.mirror = _, e.record = te, e.utils = U, e
}({});
//# sourceMappingURL=rrweb.min.js.map
var rrwebPlayer = function() {
    "use strict";

    function e() {}

    function t(e, t) { for (var n in t) e[n] = t[n]; return e }

    function n(e, t) { for (var n in t) e[n] = 1; return e }

    function i(e) { e() }

    function r(e, t) { e.appendChild(t) }

    function a(e, t, n) { e.insertBefore(t, n) }

    function s(e) { e.parentNode.removeChild(e) }

    function o(e) { return document.createElement(e) }

    function l(e) { return document.createElementNS("http://www.w3.org/2000/svg", e) }

    function h(e) { return document.createTextNode(e) }

    function c(e, t, n, i) { e.addEventListener(t, n, i) }

    function u(e, t, n, i) { e.removeEventListener(t, n, i) }

    function d(e, t, n) { null == n ? e.removeAttribute(t) : e.setAttribute(t, n) }

    function f(e, t) { e.data = "" + t }

    function p(e, t, n) { e.style.setProperty(t, n) }

    function m(e, t, n) { e.classList[n ? "add" : "remove"](t) }

    function _() { return Object.create(null) }

    function g(e) { e._lock = !0, w(e._beforecreate), w(e._oncreate), w(e._aftercreate), e._lock = !1 }

    function v(e, t) { e._handlers = _(), e._slots = _(), e._bind = t._bind, e._staged = {}, e.options = t, e.root = t.root || e, e.store = t.store || e.root.store, t.root || (e._beforecreate = [], e._oncreate = [], e._aftercreate = []) }

    function w(e) { for (; e && e.length;) e.shift()() }
    var y, b, k, x, S, z = {
            destroy: function(t) { this.destroy = e, this.fire("destroy"), this.set = e, this._fragment.d(!1 !== t), this._fragment = null, this._state = {} },
            get: function() { return this._state },
            fire: function(e, t) {
                var n = e in this._handlers && this._handlers[e].slice();
                if (n)
                    for (var i = 0; i < n.length; i += 1) { var r = n[i]; if (!r.__calling) try { r.__calling = !0, r.call(this, t) } finally { r.__calling = !1 } }
            },
            on: function(e, t) { var n = this._handlers[e] || (this._handlers[e] = []); return n.push(t), { cancel: function() { var e = n.indexOf(t);~e && n.splice(e, 1) } } },
            set: function(e) { this._set(t({}, e)), this.root._lock || g(this.root) },
            _recompute: e,
            _set: function(e) {
                var n = this._state,
                    i = {},
                    r = !1;
                for (var a in e = t(this._staged, e), this._staged = {}, e) this._differs(e[a], n[a]) && (i[a] = r = !0);
                r && (this._state = t(t({}, n), e), this._recompute(i, this._state), this._bind && this._bind(i, this._state), this._fragment && (this.fire("state", { changed: i, current: this._state, previous: n }), this._fragment.p(i, this._state), this.fire("update", { changed: i, current: this._state, previous: n })))
            },
            _stage: function(e) { t(this._staged, e) },
            _mount: function(e, t) { this._fragment[this._fragment.i ? "i" : "m"](e, t || null) },
            _differs: function(e, t) { return e != e ? t == t : e !== t || e && "object" == typeof e || "function" == typeof e }
        },
        E = {
            map: {},
            getId: function(e) { return e.__sn ? e.__sn.id : -1 },
            getNode: function(e) { return E.map[e] || null },
            removeNodeFromMap: function(e) {
                var t = e.__sn && e.__sn.id;
                delete E.map[t], e.childNodes && e.childNodes.forEach(function(e) { return E.removeNodeFromMap(e) })
            },
            has: function(e) { return E.map.hasOwnProperty(e) }
        };
    ! function(e) { e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom" }(y || (y = {})),
    function(e) { e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule" }(b || (b = {})),
    function(e) { e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd" }(k || (k = {})),
    function(e) { e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause" }(x || (x = {})),
    function(e) { e.Start = "start", e.Pause = "pause", e.Resume = "resume", e.Resize = "resize", e.Finish = "finish", e.FullsnapshotRebuilded = "fullsnapshot-rebuilded", e.LoadStylesheetStart = "load-stylesheet-start", e.LoadStylesheetEnd = "load-stylesheet-end", e.SkipStart = "skip-start", e.SkipEnd = "skip-end", e.MouseInteraction = "mouse-interaction", e.EventCast = "event-cast" }(S || (S = {}));
    var C, N = function() {
        return (N = Object.assign || function(e) {
            for (var t, n = 1, i = arguments.length; n < i; n++)
                for (var r in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
            return e
        }).apply(this, arguments)
    };

    function M(e) {
        var t = "function" == typeof Symbol && e[Symbol.iterator],
            n = 0;
        return t ? t.call(e) : { next: function() { return e && n >= e.length && (e = void 0), { value: e && e[n++], done: !e } } }
    }

    function T(e, t) {
        var n = "function" == typeof Symbol && e[Symbol.iterator];
        if (!n) return e;
        var i, r, a = n.call(e),
            s = [];
        try {
            for (;
                (void 0 === t || t-- > 0) && !(i = a.next()).done;) s.push(i.value)
        } catch (e) { r = { error: e } } finally { try { i && !i.done && (n = a.return) && n.call(a) } finally { if (r) throw r.error } }
        return s
    }! function(e) { e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment" }(C || (C = {}));
    var A = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//g;

    function I(e, t) {
        void 0 === t && (t = {});
        var n = 1,
            i = 1;

        function r(e) {
            var t = e.match(/\n/g);
            t && (n += t.length);
            var r = e.lastIndexOf("\n");
            i = -1 === r ? i + e.length : e.length - r
        }

        function a() { var e = { line: n, column: i }; return function(t) { return t.position = new s(e), f(), t } }
        var s = function() { return function(e) { this.start = e, this.end = { line: n, column: i }, this.source = t.source } }();
        s.prototype.content = e;
        var o = [];

        function l(r) {
            var a = new Error(t.source + ":" + n + ":" + i + ": " + r);
            if (a.reason = r, a.filename = t.source, a.line = n, a.column = i, a.source = e, !t.silent) throw a;
            o.push(a)
        }

        function h() { return d(/^{\s*/) }

        function c() { return d(/^}/) }

        function u() { var t, n = []; for (f(), p(n); e.length && "}" !== e.charAt(0) && (t = z() || E());) !1 !== t && (n.push(t), p(n)); return n }

        function d(t) { var n = t.exec(e); if (n) { var i = n[0]; return r(i), e = e.slice(i.length), n } }

        function f() { d(/^\s*/) }

        function p(e) { var t; for (void 0 === e && (e = []); t = m();) !1 !== t && e.push(t), t = m(); return e }

        function m() {
            var t = a();
            if ("/" === e.charAt(0) && "*" === e.charAt(1)) {
                for (var n = 2;
                    "" !== e.charAt(n) && ("*" !== e.charAt(n) || "/" !== e.charAt(n + 1));) ++n;
                if (n += 2, "" === e.charAt(n - 1)) return l("End of comment missing");
                var s = e.slice(2, n - 2);
                return i += 2, r(s), e = e.slice(n), i += 2, t({ type: "comment", comment: s })
            }
        }

        function _() { var e = d(/^([^{]+)/); if (e) return B(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*\/+/g, "").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, function(e) { return e.replace(/,/g, "‌") }).split(/\s*(?![^(]*\)),\s*/).map(function(e) { return e.replace(/\u200C/g, ",") }) }

        function g() {
            var e = a(),
                t = d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
            if (t) {
                var n = B(t[0]);
                if (!d(/^:\s*/)) return l("property missing ':'");
                var i = d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),
                    r = e({ type: "declaration", property: n.replace(A, ""), value: i ? B(i[0]).replace(A, "") : "" });
                return d(/^[;\s]*/), r
            }
        }

        function v() { var e, t = []; if (!h()) return l("missing '{'"); for (p(t); e = g();) !1 !== e && (t.push(e), p(t)), e = g(); return c() ? t : l("missing '}'") }

        function w() { for (var e, t = [], n = a(); e = d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);) t.push(e[1]), d(/^,\s*/); if (t.length) return n({ type: "keyframe", values: t, declarations: v() }) }
        var y, b = S("import"),
            k = S("charset"),
            x = S("namespace");

        function S(e) {
            var t = new RegExp("^@" + e + "\\s*([^;]+);");
            return function() {
                var n = a(),
                    i = d(t);
                if (i) { var r = { type: e }; return r[e] = i[1].trim(), n(r) }
            }
        }

        function z() {
            if ("@" === e[0]) return function() {
                var e = a(),
                    t = d(/^@([-\w]+)?keyframes\s*/);
                if (t) { var n = t[1]; if (!(t = d(/^([-\w]+)\s*/))) return l("@keyframes missing name"); var i, r = t[1]; if (!h()) return l("@keyframes missing '{'"); for (var s = p(); i = w();) s.push(i), s = s.concat(p()); return c() ? e({ type: "keyframes", name: r, vendor: n, keyframes: s }) : l("@keyframes missing '}'") }
            }() || function() {
                var e = a(),
                    t = d(/^@media *([^{]+)/);
                if (t) { var n = B(t[1]); if (!h()) return l("@media missing '{'"); var i = p().concat(u()); return c() ? e({ type: "media", media: n, rules: i }) : l("@media missing '}'") }
            }() || function() {
                var e = a(),
                    t = d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
                if (t) return e({ type: "custom-media", name: B(t[1]), media: B(t[2]) })
            }() || function() {
                var e = a(),
                    t = d(/^@supports *([^{]+)/);
                if (t) { var n = B(t[1]); if (!h()) return l("@supports missing '{'"); var i = p().concat(u()); return c() ? e({ type: "supports", supports: n, rules: i }) : l("@supports missing '}'") }
            }() || b() || k() || x() || function() {
                var e = a(),
                    t = d(/^@([-\w]+)?document *([^{]+)/);
                if (t) {
                    var n = B(t[1]),
                        i = B(t[2]);
                    if (!h()) return l("@document missing '{'");
                    var r = p().concat(u());
                    return c() ? e({ type: "document", document: i, vendor: n, rules: r }) : l("@document missing '}'")
                }
            }() || function() { var e = a(); if (d(/^@page */)) { var t = _() || []; if (!h()) return l("@page missing '{'"); for (var n, i = p(); n = g();) i.push(n), i = i.concat(p()); return c() ? e({ type: "page", selectors: t, declarations: i }) : l("@page missing '}'") } }() || function() { var e = a(); if (d(/^@host\s*/)) { if (!h()) return l("@host missing '{'"); var t = p().concat(u()); return c() ? e({ type: "host", rules: t }) : l("@host missing '}'") } }() || function() { var e = a(); if (d(/^@font-face\s*/)) { if (!h()) return l("@font-face missing '{'"); for (var t, n = p(); t = g();) n.push(t), n = n.concat(p()); return c() ? e({ type: "font-face", declarations: n }) : l("@font-face missing '}'") } }()
        }

        function E() {
            var e = a(),
                t = _();
            return t ? (p(), e({ type: "rule", selectors: t, declarations: v() })) : l("selector missing")
        }
        return function e(t, n) {
            var i = t && "string" == typeof t.type;
            var r = i ? t : n;
            for (var a = 0, s = Object.keys(t); a < s.length; a++) {
                var o = s[a],
                    l = t[o];
                Array.isArray(l) ? l.forEach(function(t) { e(t, r) }) : l && "object" == typeof l && e(l, r)
            }
            i && Object.defineProperty(t, "parent", { configurable: !0, writable: !0, enumerable: !1, value: n || null });
            return t
        }((y = u(), { type: "stylesheet", stylesheet: { source: t.source, rules: y, parsingErrors: o } }))
    }

    function B(e) { return e ? e.replace(/^\s+|\s+$/g, "") : "" }
    var L = { script: "noscript", altglyph: "altGlyph", altglyphdef: "altGlyphDef", altglyphitem: "altGlyphItem", animatecolor: "animateColor", animatemotion: "animateMotion", animatetransform: "animateTransform", clippath: "clipPath", feblend: "feBlend", fecolormatrix: "feColorMatrix", fecomponenttransfer: "feComponentTransfer", fecomposite: "feComposite", feconvolvematrix: "feConvolveMatrix", fediffuselighting: "feDiffuseLighting", fedisplacementmap: "feDisplacementMap", fedistantlight: "feDistantLight", fedropshadow: "feDropShadow", feflood: "feFlood", fefunca: "feFuncA", fefuncb: "feFuncB", fefuncg: "feFuncG", fefuncr: "feFuncR", fegaussianblur: "feGaussianBlur", feimage: "feImage", femerge: "feMerge", femergenode: "feMergeNode", femorphology: "feMorphology", feoffset: "feOffset", fepointlight: "fePointLight", fespecularlighting: "feSpecularLighting", fespotlight: "feSpotLight", fetile: "feTile", feturbulence: "feTurbulence", foreignobject: "foreignObject", glyphref: "glyphRef", lineargradient: "linearGradient", radialgradient: "radialGradient" };
    var D = /([^\\]):hover/g;

    function F(e) {
        var t = I(e, { silent: !0 });
        return t.stylesheet ? (t.stylesheet.rules.forEach(function(t) {
            "selectors" in t && (t.selectors || []).forEach(function(t) {
                if (D.test(t)) {
                    var n = t.replace(D, "$1.\\:hover");
                    e = e.replace(t, t + ", " + n)
                }
            })
        }), e) : e
    }

    function O(e, t, n) {
        switch (e.type) {
            case C.Document:
                return t.implementation.createDocument(null, "", null);
            case C.DocumentType:
                return t.implementation.createDocumentType(e.name, e.publicId, e.systemId);
            case C.Element:
                var i, r = function(e) { var t = L[e.tagName] ? L[e.tagName] : e.tagName; return "link" === t && e.attributes._cssText && (t = "style"), t }(e);
                i = e.isSVG ? t.createElementNS("http://www.w3.org/2000/svg", r) : t.createElement(r);
                var a = function(a) {
                    if (!e.attributes.hasOwnProperty(a)) return "continue";
                    var s = e.attributes[a];
                    if (s = "boolean" == typeof s ? "" : s, a.startsWith("rr_")) {
                        if ("canvas" === r && "rr_dataURL" === a) {
                            var o = document.createElement("img");
                            o.src = s, o.onload = function() {
                                var e = i.getContext("2d");
                                e && e.drawImage(o, 0, 0, o.width, o.height)
                            }
                        }
                        if ("rr_width" === a && (i.style.width = s), "rr_height" === a && (i.style.height = s), "rr_mediaState" === a) switch (s) {
                            case "played":
                                i.play();
                            case "paused":
                                i.pause()
                        }
                    } else {
                        var l = "textarea" === r && "value" === a,
                            h = "style" === r && "_cssText" === a;
                        if (h && n && (s = F(s)), l || h) {
                            for (var c = t.createTextNode(s), u = 0, d = Array.from(i.childNodes); u < d.length; u++) {
                                var f = d[u];
                                f.nodeType === i.TEXT_NODE && i.removeChild(f)
                            }
                            return i.appendChild(c), "continue"
                        }
                        if ("iframe" === r && "src" === a) return "continue";
                        try { e.isSVG && "xlink:href" === a ? i.setAttributeNS("http://www.w3.org/1999/xlink", a, s) : i.setAttribute(a, s) } catch (e) {}
                    }
                };
                for (var s in e.attributes) a(s);
                return i;
            case C.Text:
                return t.createTextNode(e.isStyle && n ? F(e.textContent) : e.textContent);
            case C.CDATA:
                return t.createCDATASection(e.textContent);
            case C.Comment:
                return t.createComment(e.textContent);
            default:
                return null
        }
    }

    function R(e, t, n, i, r) {
        void 0 === i && (i = !1), void 0 === r && (r = !0);
        var a = O(e, t, r);
        if (!a) return null;
        if (e.type === C.Document && (t.close(), t.open(), a = t), a.__sn = e, n[e.id] = a, (e.type === C.Document || e.type === C.Element) && !i)
            for (var s = 0, o = e.childNodes; s < o.length; s++) {
                var l = o[s],
                    h = R(l, t, n, !1, r);
                h ? a.appendChild(h) : console.warn("Failed to rebuild", l)
            }
        return a
    }

    function j(e) {
        return e = e || Object.create(null), {
            on: function(t, n) {
                (e[t] || (e[t] = [])).push(n)
            },
            off: function(t, n) { e[t] && e[t].splice(e[t].indexOf(n) >>> 0, 1) },
            emit: function(t, n) {
                (e[t] || []).slice().map(function(e) { e(n) }), (e["*"] || []).slice().map(function(e) { e(t, n) })
            }
        }
    }
    var P = Object.freeze({ default: j });

    function U() { throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs") }

    function Z(e, t) { return e(t = { exports: {} }, t.exports), t.exports }
    var H = Z(function(e, t) {
            ! function() {
                e.exports = {
                    polyfill: function() {
                        var e = window,
                            t = document;
                        if (!("scrollBehavior" in t.documentElement.style && !0 !== e.__forceSmoothScrollPolyfill__)) {
                            var n, i = e.HTMLElement || e.Element,
                                r = 468,
                                a = { scroll: e.scroll || e.scrollTo, scrollBy: e.scrollBy, elementScroll: i.prototype.scroll || l, scrollIntoView: i.prototype.scrollIntoView },
                                s = e.performance && e.performance.now ? e.performance.now.bind(e.performance) : Date.now,
                                o = (n = e.navigator.userAgent, new RegExp(["MSIE ", "Trident/", "Edge/"].join("|")).test(n) ? 1 : 0);
                            e.scroll = e.scrollTo = function() { void 0 !== arguments[0] && (!0 !== h(arguments[0]) ? p.call(e, t.body, void 0 !== arguments[0].left ? ~~arguments[0].left : e.scrollX || e.pageXOffset, void 0 !== arguments[0].top ? ~~arguments[0].top : e.scrollY || e.pageYOffset) : a.scroll.call(e, void 0 !== arguments[0].left ? arguments[0].left : "object" != typeof arguments[0] ? arguments[0] : e.scrollX || e.pageXOffset, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : e.scrollY || e.pageYOffset)) }, e.scrollBy = function() { void 0 !== arguments[0] && (h(arguments[0]) ? a.scrollBy.call(e, void 0 !== arguments[0].left ? arguments[0].left : "object" != typeof arguments[0] ? arguments[0] : 0, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : 0) : p.call(e, t.body, ~~arguments[0].left + (e.scrollX || e.pageXOffset), ~~arguments[0].top + (e.scrollY || e.pageYOffset))) }, i.prototype.scroll = i.prototype.scrollTo = function() {
                                if (void 0 !== arguments[0])
                                    if (!0 !== h(arguments[0])) {
                                        var e = arguments[0].left,
                                            t = arguments[0].top;
                                        p.call(this, this, void 0 === e ? this.scrollLeft : ~~e, void 0 === t ? this.scrollTop : ~~t)
                                    } else {
                                        if ("number" == typeof arguments[0] && void 0 === arguments[1]) throw new SyntaxError("Value could not be converted");
                                        a.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left : "object" != typeof arguments[0] ? ~~arguments[0] : this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top : void 0 !== arguments[1] ? ~~arguments[1] : this.scrollTop)
                                    }
                            }, i.prototype.scrollBy = function() { void 0 !== arguments[0] && (!0 !== h(arguments[0]) ? this.scroll({ left: ~~arguments[0].left + this.scrollLeft, top: ~~arguments[0].top + this.scrollTop, behavior: arguments[0].behavior }) : a.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop)) }, i.prototype.scrollIntoView = function() {
                                if (!0 !== h(arguments[0])) {
                                    var n = function(e) { for (; e !== t.body && !1 === d(e);) e = e.parentNode || e.host; return e }(this),
                                        i = n.getBoundingClientRect(),
                                        r = this.getBoundingClientRect();
                                    n !== t.body ? (p.call(this, n, n.scrollLeft + r.left - i.left, n.scrollTop + r.top - i.top), "fixed" !== e.getComputedStyle(n).position && e.scrollBy({ left: i.left, top: i.top, behavior: "smooth" })) : e.scrollBy({ left: r.left, top: r.top, behavior: "smooth" })
                                } else a.scrollIntoView.call(this, void 0 === arguments[0] || arguments[0])
                            }
                        }

                        function l(e, t) { this.scrollLeft = e, this.scrollTop = t }

                        function h(e) { if (null === e || "object" != typeof e || void 0 === e.behavior || "auto" === e.behavior || "instant" === e.behavior) return !0; if ("object" == typeof e && "smooth" === e.behavior) return !1; throw new TypeError("behavior member of ScrollOptions " + e.behavior + " is not a valid value for enumeration ScrollBehavior.") }

                        function c(e, t) { return "Y" === t ? e.clientHeight + o < e.scrollHeight : "X" === t ? e.clientWidth + o < e.scrollWidth : void 0 }

                        function u(t, n) { var i = e.getComputedStyle(t, null)["overflow" + n]; return "auto" === i || "scroll" === i }

                        function d(e) {
                            var t = c(e, "Y") && u(e, "Y"),
                                n = c(e, "X") && u(e, "X");
                            return t || n
                        }

                        function f(t) {
                            var n, i, a, o, l = (s() - t.startTime) / r;
                            o = l = l > 1 ? 1 : l, n = .5 * (1 - Math.cos(Math.PI * o)), i = t.startX + (t.x - t.startX) * n, a = t.startY + (t.y - t.startY) * n, t.method.call(t.scrollable, i, a), i === t.x && a === t.y || e.requestAnimationFrame(f.bind(e, t))
                        }

                        function p(n, i, r) {
                            var o, h, c, u, d = s();
                            n === t.body ? (o = e, h = e.scrollX || e.pageXOffset, c = e.scrollY || e.pageYOffset, u = a.scroll) : (o = n, h = n.scrollLeft, c = n.scrollTop, u = l), f({ scrollable: o, method: u, startTime: d, startX: h, startY: c, x: i, y: r })
                        }
                    }
                }
            }()
        }).polyfill,
        q = function() {
            function e(e, t) { void 0 === t && (t = []), this.timeOffset = 0, this.actions = t, this.config = e }
            return e.prototype.addAction = function(e) {
                var t = this.findActionIndex(e);
                this.actions.splice(t, 0, e)
            }, e.prototype.addActions = function(e) {
                var t;
                (t = this.actions).push.apply(t, function() { for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(T(arguments[t])); return e }(e))
            }, e.prototype.start = function() {
                this.actions.sort(function(e, t) { return e.delay - t.delay }), this.timeOffset = 0;
                var e = performance.now(),
                    t = this.actions,
                    n = this.config,
                    i = this;
                this.raf = requestAnimationFrame(function r(a) {
                    for (i.timeOffset += (a - e) * n.speed, e = a; t.length;) {
                        var s = t[0];
                        if (!(i.timeOffset >= s.delay)) break;
                        t.shift(), s.doAction()
                    }(t.length > 0 || i.config.liveMode) && (i.raf = requestAnimationFrame(r))
                })
            }, e.prototype.clear = function() { this.raf && cancelAnimationFrame(this.raf), this.actions.length = 0 }, e.prototype.findActionIndex = function(e) {
                for (var t = 0, n = this.actions.length - 1; t <= n;) {
                    var i = Math.floor((t + n) / 2);
                    if (this.actions[i].delay < e.delay) t = i + 1;
                    else {
                        if (!(this.actions[i].delay > e.delay)) return i;
                        n = i - 1
                    }
                }
                return t
            }, e
        }(),
        Y = j || P,
        X = function() {
            function e(e, t) {
                if (this.events = [], this.emitter = Y(), this.baselineTime = 0, this.noramlSpeed = -1, this.missingNodeRetryMap = {}, this.playing = !1, e.length < 2) throw new Error("Replayer need at least 2 events.");
                this.events = e.map(function(e) { return t && t.unpackFn ? t.unpackFn(e) : e }), this.handleResize = this.handleResize.bind(this);
                var n = { speed: 1, root: document.body, loadTimeout: 0, skipInactive: !1, showWarning: !0, showDebug: !1, blockClass: "rr-block", liveMode: !1, insertStyleRules: [], triggerFocus: !0 };
                this.config = Object.assign({}, n, t), this.timer = new q(this.config), H(), "NodeList" in window && !NodeList.prototype.forEach && (NodeList.prototype.forEach = Array.prototype.forEach), this.setupDom(), this.emitter.on("resize", this.handleResize)
            }
            return e.prototype.on = function(e, t) { this.emitter.on(e, t) }, e.prototype.setConfig = function(e) {
                var t = this;
                Object.keys(e).forEach(function(n) { t.config[n] = e[n] }), this.config.skipInactive || (this.noramlSpeed = -1)
            }, e.prototype.getMetaData = function() { var e = this.events[0]; return { totalTime: this.events[this.events.length - 1].timestamp - e.timestamp } }, e.prototype.getCurrentTime = function() { return this.timer.timeOffset + this.getTimeOffset() }, e.prototype.getTimeOffset = function() { return this.baselineTime - this.events[0].timestamp }, e.prototype.play = function(e) {
                var t, n, i = this;
                void 0 === e && (e = 0), this.timer.clear(), this.baselineTime = this.events[0].timestamp + e;
                var r = new Array,
                    a = function(e) {
                        var t = e.timestamp < s.baselineTime,
                            n = s.getCastFn(e, t);
                        t ? n() : r.push({ doAction: function() { n(), i.emitter.emit(S.EventCast, e) }, delay: s.getDelay(e) })
                    },
                    s = this;
                try { for (var o = M(this.events), l = o.next(); !l.done; l = o.next()) { a(l.value) } } catch (e) { t = { error: e } } finally { try { l && !l.done && (n = o.return) && n.call(o) } finally { if (t) throw t.error } }
                this.timer.addActions(r), this.timer.start(), this.playing = !0, this.emitter.emit(S.Start)
            }, e.prototype.pause = function() { this.timer.clear(), this.playing = !1, this.emitter.emit(S.Pause) }, e.prototype.resume = function(e) {
                var t, n;
                void 0 === e && (e = 0), this.timer.clear(), this.baselineTime = this.events[0].timestamp + e;
                var i = new Array;
                try {
                    for (var r = M(this.events), a = r.next(); !a.done; a = r.next()) {
                        var s = a.value;
                        if (!(s.timestamp <= this.lastPlayedEvent.timestamp || s === this.lastPlayedEvent)) {
                            var o = this.getCastFn(s);
                            i.push({ doAction: o, delay: this.getDelay(s) })
                        }
                    }
                } catch (e) { t = { error: e } } finally { try { a && !a.done && (n = r.return) && n.call(r) } finally { if (t) throw t.error } }
                this.timer.addActions(i), this.timer.start(), this.playing = !0, this.emitter.emit(S.Resume)
            }, e.prototype.addEvent = function(e) {
                var t = this.config.unpackFn ? this.config.unpackFn(e) : e;
                this.getCastFn(t, !0)()
            }, e.prototype.setupDom = function() { this.wrapper = document.createElement("div"), this.wrapper.classList.add("replayer-wrapper"), this.config.root.appendChild(this.wrapper), this.mouse = document.createElement("div"), this.mouse.classList.add("replayer-mouse"), this.wrapper.appendChild(this.mouse), this.iframe = document.createElement("iframe"), this.iframe.setAttribute("sandbox", "allow-same-origin"), this.iframe.setAttribute("scrolling", "no"), this.iframe.setAttribute("style", "pointer-events: none"), this.wrapper.appendChild(this.iframe) }, e.prototype.handleResize = function(e) { this.iframe.width = e.width + "px", this.iframe.height = e.height + "px" }, e.prototype.getDelay = function(e) {
                if (e.type === y.IncrementalSnapshot && e.data.source === b.MouseMove) {
                    var t = e.data.positions[0].timeOffset,
                        n = e.timestamp + t;
                    return e.delay = n - this.baselineTime, n - this.baselineTime
                }
                return e.delay = e.timestamp - this.baselineTime, e.timestamp - this.baselineTime
            }, e.prototype.getCastFn = function(e, t) {
                var n, i = this;
                switch (void 0 === t && (t = !1), e.type) {
                    case y.DomContentLoaded:
                    case y.Load:
                        break;
                    case y.Meta:
                        n = function() { return i.emitter.emit(S.Resize, { width: e.data.width, height: e.data.height }) };
                        break;
                    case y.FullSnapshot:
                        n = function() { i.rebuildFullSnapshot(e), i.iframe.contentWindow.scrollTo(e.data.initialOffset) };
                        break;
                    case y.IncrementalSnapshot:
                        n = function() {
                            var n, r;
                            if (i.applyIncremental(e, t), e === i.nextUserInteractionEvent && (i.nextUserInteractionEvent = null, i.restoreSpeed()), i.config.skipInactive && !i.nextUserInteractionEvent) {
                                try { for (var a = M(i.events), s = a.next(); !s.done; s = a.next()) { var o = s.value; if (!(o.timestamp <= e.timestamp) && i.isUserInteraction(o)) { o.delay - e.delay > 1e4 * i.config.speed && (i.nextUserInteractionEvent = o); break } } } catch (e) { n = { error: e } } finally { try { s && !s.done && (r = a.return) && r.call(a) } finally { if (n) throw n.error } }
                                if (i.nextUserInteractionEvent) {
                                    i.noramlSpeed = i.config.speed;
                                    var l = i.nextUserInteractionEvent.delay - e.delay,
                                        h = { speed: Math.min(Math.round(l / 5e3), 360) };
                                    i.setConfig(h), i.emitter.emit(S.SkipStart, h)
                                }
                            }
                        }
                }
                return function() { n && n(), i.lastPlayedEvent = e, e === i.events[i.events.length - 1] && (i.restoreSpeed(), i.emitter.emit(S.Finish)) }
            }, e.prototype.rebuildFullSnapshot = function(e) {
                Object.keys(this.missingNodeRetryMap).length && console.warn("Found unresolved missing node map", this.missingNodeRetryMap), this.missingNodeRetryMap = {}, E.map = function(e, t, n) { void 0 === n && (n = !0); var i = {}; return [R(e, t, i, !1, n), i] }(e.data.node, this.iframe.contentDocument)[1];
                var t = document.createElement("style"),
                    n = this.iframe.contentDocument,
                    i = n.documentElement,
                    r = n.head;
                i.insertBefore(t, r);
                for (var a, s = (a = this.config.blockClass, ["iframe, ." + a + " { background: #ccc }", "noscript { display: none !important; }"]).concat(this.config.insertStyleRules), o = 0; o < s.length; o++) t.sheet.insertRule(s[o], o);
                this.emitter.emit(S.FullsnapshotRebuilded), this.waitForStylesheetLoad()
            }, e.prototype.waitForStylesheetLoad = function() {
                var e = this,
                    t = this.iframe.contentDocument.head;
                if (t) {
                    var n, i = new Set;
                    t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t) { t.sheet || (0 === i.size && (e.timer.clear(), e.emitter.emit(S.LoadStylesheetStart), n = window.setTimeout(function() { e.playing && e.resume(e.getCurrentTime()), n = -1 }, e.config.loadTimeout)), i.add(t), t.addEventListener("load", function() { i.delete(t), 0 === i.size && -1 !== n && (e.playing && e.resume(e.getCurrentTime()), e.emitter.emit(S.LoadStylesheetEnd), n && window.clearTimeout(n)) })) })
                }
            }, e.prototype.applyIncremental = function(e, t) {
                var n = this,
                    i = e.data;
                switch (i.source) {
                    case b.Mutation:
                        i.removes.forEach(function(e) {
                            var t = E.getNode(e.id);
                            if (!t) return n.warnNodeNotFound(i, e.id);
                            var r = E.getNode(e.parentId);
                            if (!r) return n.warnNodeNotFound(i, e.parentId);
                            E.removeNodeFromMap(t), r && r.removeChild(t)
                        });
                        var r = N({}, this.missingNodeRetryMap),
                            a = [],
                            s = function(e) {
                                var t = E.getNode(e.parentId);
                                if (!t) return a.push(e);
                                var i = R(e.node, n.iframe.contentDocument, E.map, !0),
                                    s = null,
                                    o = null;
                                e.previousId && (s = E.getNode(e.previousId)), e.nextId && (o = E.getNode(e.nextId)), -1 !== e.previousId && -1 !== e.nextId ? (s && s.nextSibling && s.nextSibling.parentNode ? t.insertBefore(i, s.nextSibling) : o && o.parentNode ? t.contains(o) ? t.insertBefore(i, o) : t.insertBefore(i, null) : t.appendChild(i), (e.previousId || e.nextId) && n.resolveMissingNode(r, t, i, e)) : r[e.node.id] = { node: i, mutation: e }
                            };
                        for (i.adds.forEach(function(e) { s(e) }); a.length;) {
                            if (a.every(function(e) { return !Boolean(E.getNode(e.parentId)) })) return a.forEach(function(e) { return n.warnNodeNotFound(i, e.node.id) });
                            var o = a.shift();
                            s(o)
                        }
                        Object.keys(r).length && Object.assign(this.missingNodeRetryMap, r), i.texts.forEach(function(e) {
                            var t = E.getNode(e.id);
                            if (!t) return n.warnNodeNotFound(i, e.id);
                            t.textContent = e.value
                        }), i.attributes.forEach(function(e) {
                            var t = E.getNode(e.id);
                            if (!t) return n.warnNodeNotFound(i, e.id);
                            for (var r in e.attributes)
                                if ("string" == typeof r) {
                                    var a = e.attributes[r];
                                    null !== a ? t.setAttribute(r, a) : t.removeAttribute(r)
                                }
                        });
                        break;
                    case b.MouseMove:
                        if (t) {
                            var l = i.positions[i.positions.length - 1];
                            this.moveAndHover(i, l.x, l.y, l.id)
                        } else i.positions.forEach(function(t) {
                            var r = { doAction: function() { n.moveAndHover(i, t.x, t.y, t.id) }, delay: t.timeOffset + e.timestamp - n.baselineTime };
                            n.timer.addAction(r)
                        });
                        break;
                    case b.MouseInteraction:
                        if (-1 === i.id) break;
                        var h = new Event(k[i.type].toLowerCase());
                        if (!(d = E.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        this.emitter.emit(S.MouseInteraction, { type: i.type, target: d });
                        var c = this.config.triggerFocus;
                        switch (i.type) {
                            case k.Blur:
                                d.blur && d.blur();
                                break;
                            case k.Focus:
                                c && d.focus && d.focus({ preventScroll: !0 });
                                break;
                            case k.Click:
                            case k.TouchStart:
                            case k.TouchEnd:
                                t || (this.moveAndHover(i, i.x, i.y, i.id), this.mouse.classList.remove("active"), this.mouse.offsetWidth, this.mouse.classList.add("active"));
                                break;
                            default:
                                d.dispatchEvent(h)
                        }
                        break;
                    case b.Scroll:
                        if (-1 === i.id) break;
                        if (!(d = E.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        if (d === this.iframe.contentDocument) this.iframe.contentWindow.scrollTo({ top: i.y, left: i.x, behavior: t ? "auto" : "smooth" });
                        else try { d.scrollTop = i.y, d.scrollLeft = i.x } catch (e) {}
                        break;
                    case b.ViewportResize:
                        this.emitter.emit(S.Resize, { width: i.width, height: i.height });
                        break;
                    case b.Input:
                        if (-1 === i.id) break;
                        if (!(d = E.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        try { d.checked = i.isChecked, d.value = i.text } catch (e) {}
                        break;
                    case b.MediaInteraction:
                        if (!(d = E.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        var u = d;
                        i.type === x.Pause && u.pause(), i.type === x.Play && (u.readyState >= HTMLMediaElement.HAVE_CURRENT_DATA ? u.play() : u.addEventListener("canplay", function() { u.play() }));
                        break;
                    case b.StyleSheetRule:
                        var d;
                        if (!(d = E.getNode(i.id))) return this.debugNodeNotFound(i, i.id);
                        var f = d.sheet;
                        i.adds && i.adds.forEach(function(e) {
                            var t = e.rule,
                                n = e.index,
                                i = void 0 === n ? void 0 : Math.min(n, f.rules.length);
                            try { f.insertRule(t, i) } catch (e) {}
                        }), i.removes && i.removes.forEach(function(e) {
                            var t = e.index;
                            f.deleteRule(t)
                        })
                }
            }, e.prototype.resolveMissingNode = function(e, t, n, i) {
                var r = i.previousId,
                    a = i.nextId,
                    s = r && e[r],
                    o = a && e[a];
                if (s) {
                    var l = s,
                        h = l.node,
                        c = l.mutation;
                    t.insertBefore(h, n), delete e[c.node.id], delete this.missingNodeRetryMap[c.node.id], (c.previousId || c.nextId) && this.resolveMissingNode(e, t, h, c)
                }
                if (o) {
                    var u = o;
                    h = u.node, c = u.mutation;
                    t.insertBefore(h, n.nextSibling), delete e[c.node.id], delete this.missingNodeRetryMap[c.node.id], (c.previousId || c.nextId) && this.resolveMissingNode(e, t, h, c)
                }
            }, e.prototype.moveAndHover = function(e, t, n, i) {
                this.mouse.style.left = t + "px", this.mouse.style.top = n + "px";
                var r = E.getNode(i);
                if (!r) return this.debugNodeNotFound(e, i);
                this.hoverElements(r)
            }, e.prototype.hoverElements = function(e) { this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e) { e.classList.remove(":hover") }); for (var t = e; t;) t.classList && t.classList.add(":hover"), t = t.parentElement }, e.prototype.isUserInteraction = function(e) { return e.type === y.IncrementalSnapshot && (e.data.source > b.Mutation && e.data.source <= b.Input) }, e.prototype.restoreSpeed = function() {
                if (-1 !== this.noramlSpeed) {
                    var e = { speed: this.noramlSpeed };
                    this.setConfig(e), this.emitter.emit(S.SkipEnd, e), this.noramlSpeed = -1
                }
            }, e.prototype.warnNodeNotFound = function(e, t) { this.config.showWarning && console.warn("[replayer]", "Node with id '" + t + "' not found in", e) }, e.prototype.debugNodeNotFound = function(e, t) { this.config.showDebug && console.log("[replayer]", "Node with id '" + t + "' not found in", e) }, e
        }(),
        G = (Z(function(e, t) {
            e.exports = function e(t, n, i) {
                function r(s, o) {
                    if (!n[s]) {
                        if (!t[s]) { var l = U; if (!o && l) return l(s, !0); if (a) return a(s, !0); var h = new Error("Cannot find module '" + s + "'"); throw h.code = "MODULE_NOT_FOUND", h }
                        var c = n[s] = { exports: {} };
                        t[s][0].call(c.exports, function(e) { var n = t[s][1][e]; return r(n || e) }, c, c.exports, e, t, n, i)
                    }
                    return n[s].exports
                }
                for (var a = U, s = 0; s < i.length; s++) r(i[s]);
                return r
            }({
                1: [function(e, t, n) {
                    var i = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;

                    function r(e, t) { return Object.prototype.hasOwnProperty.call(e, t) }
                    n.assign = function(e) { for (var t = Array.prototype.slice.call(arguments, 1); t.length;) { var n = t.shift(); if (n) { if ("object" != typeof n) throw new TypeError(n + "must be non-object"); for (var i in n) r(n, i) && (e[i] = n[i]) } } return e }, n.shrinkBuf = function(e, t) { return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e) };
                    var a = {
                            arraySet: function(e, t, n, i, r) {
                                if (t.subarray && e.subarray) e.set(t.subarray(n, n + i), r);
                                else
                                    for (var a = 0; a < i; a++) e[r + a] = t[n + a]
                            },
                            flattenChunks: function(e) { var t, n, i, r, a, s; for (i = 0, t = 0, n = e.length; t < n; t++) i += e[t].length; for (s = new Uint8Array(i), r = 0, t = 0, n = e.length; t < n; t++) a = e[t], s.set(a, r), r += a.length; return s }
                        },
                        s = { arraySet: function(e, t, n, i, r) { for (var a = 0; a < i; a++) e[r + a] = t[n + a] }, flattenChunks: function(e) { return [].concat.apply([], e) } };
                    n.setTyped = function(e) { e ? (n.Buf8 = Uint8Array, n.Buf16 = Uint16Array, n.Buf32 = Int32Array, n.assign(n, a)) : (n.Buf8 = Array, n.Buf16 = Array, n.Buf32 = Array, n.assign(n, s)) }, n.setTyped(i)
                }, {}],
                2: [function(e, t, n) {
                    var i = e("./common"),
                        r = !0,
                        a = !0;
                    try { String.fromCharCode.apply(null, [0]) } catch (e) { r = !1 }
                    try { String.fromCharCode.apply(null, new Uint8Array(1)) } catch (e) { a = !1 }
                    for (var s = new i.Buf8(256), o = 0; o < 256; o++) s[o] = o >= 252 ? 6 : o >= 248 ? 5 : o >= 240 ? 4 : o >= 224 ? 3 : o >= 192 ? 2 : 1;

                    function l(e, t) { if (t < 65534 && (e.subarray && a || !e.subarray && r)) return String.fromCharCode.apply(null, i.shrinkBuf(e, t)); for (var n = "", s = 0; s < t; s++) n += String.fromCharCode(e[s]); return n }
                    s[254] = s[254] = 1, n.string2buf = function(e) {
                        var t, n, r, a, s, o = e.length,
                            l = 0;
                        for (a = 0; a < o; a++) 55296 == (64512 & (n = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (r = e.charCodeAt(a + 1))) && (n = 65536 + (n - 55296 << 10) + (r - 56320), a++), l += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4;
                        for (t = new i.Buf8(l), s = 0, a = 0; s < l; a++) 55296 == (64512 & (n = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (r = e.charCodeAt(a + 1))) && (n = 65536 + (n - 55296 << 10) + (r - 56320), a++), n < 128 ? t[s++] = n : n < 2048 ? (t[s++] = 192 | n >>> 6, t[s++] = 128 | 63 & n) : n < 65536 ? (t[s++] = 224 | n >>> 12, t[s++] = 128 | n >>> 6 & 63, t[s++] = 128 | 63 & n) : (t[s++] = 240 | n >>> 18, t[s++] = 128 | n >>> 12 & 63, t[s++] = 128 | n >>> 6 & 63, t[s++] = 128 | 63 & n);
                        return t
                    }, n.buf2binstring = function(e) { return l(e, e.length) }, n.binstring2buf = function(e) { for (var t = new i.Buf8(e.length), n = 0, r = t.length; n < r; n++) t[n] = e.charCodeAt(n); return t }, n.buf2string = function(e, t) {
                        var n, i, r, a, o = t || e.length,
                            h = new Array(2 * o);
                        for (i = 0, n = 0; n < o;)
                            if ((r = e[n++]) < 128) h[i++] = r;
                            else if ((a = s[r]) > 4) h[i++] = 65533, n += a - 1;
                        else {
                            for (r &= 2 === a ? 31 : 3 === a ? 15 : 7; a > 1 && n < o;) r = r << 6 | 63 & e[n++], a--;
                            a > 1 ? h[i++] = 65533 : r < 65536 ? h[i++] = r : (r -= 65536, h[i++] = 55296 | r >> 10 & 1023, h[i++] = 56320 | 1023 & r)
                        }
                        return l(h, i)
                    }, n.utf8border = function(e, t) { var n; for ((t = t || e.length) > e.length && (t = e.length), n = t - 1; n >= 0 && 128 == (192 & e[n]);) n--; return n < 0 ? t : 0 === n ? t : n + s[e[n]] > t ? n : t }
                }, { "./common": 1 }],
                3: [function(e, t, n) {
                    t.exports = function(e, t, n, i) {
                        for (var r = 65535 & e | 0, a = e >>> 16 & 65535 | 0, s = 0; 0 !== n;) {
                            n -= s = n > 2e3 ? 2e3 : n;
                            do { r = r + t[i++] | 0, a = a + r | 0 } while (--s);
                            r %= 65521, a %= 65521
                        }
                        return r | a << 16 | 0
                    }
                }, {}],
                4: [function(e, t, n) {
                    var i = function() {
                        for (var e, t = [], n = 0; n < 256; n++) {
                            e = n;
                            for (var i = 0; i < 8; i++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                            t[n] = e
                        }
                        return t
                    }();
                    t.exports = function(e, t, n, r) {
                        var a = i,
                            s = r + n;
                        e ^= -1;
                        for (var o = r; o < s; o++) e = e >>> 8 ^ a[255 & (e ^ t[o])];
                        return -1 ^ e
                    }
                }, {}],
                5: [function(e, t, n) {
                    var i, r = e("../utils/common"),
                        a = e("./trees"),
                        s = e("./adler32"),
                        o = e("./crc32"),
                        l = e("./messages"),
                        h = 0,
                        c = 1,
                        u = 3,
                        d = 4,
                        f = 5,
                        p = 0,
                        m = 1,
                        _ = -2,
                        g = -3,
                        v = -5,
                        w = -1,
                        y = 1,
                        b = 2,
                        k = 3,
                        x = 4,
                        S = 0,
                        z = 2,
                        E = 8,
                        C = 9,
                        N = 15,
                        M = 8,
                        T = 286,
                        A = 30,
                        I = 19,
                        B = 2 * T + 1,
                        L = 15,
                        D = 3,
                        F = 258,
                        O = F + D + 1,
                        R = 32,
                        j = 42,
                        P = 69,
                        U = 73,
                        Z = 91,
                        H = 103,
                        q = 113,
                        Y = 666,
                        X = 1,
                        G = 2,
                        W = 3,
                        $ = 4,
                        K = 3;

                    function V(e, t) { return e.msg = l[t], t }

                    function Q(e) { return (e << 1) - (e > 4 ? 9 : 0) }

                    function J(e) { for (var t = e.length; --t >= 0;) e[t] = 0 }

                    function ee(e) {
                        var t = e.state,
                            n = t.pending;
                        n > e.avail_out && (n = e.avail_out), 0 !== n && (r.arraySet(e.output, t.pending_buf, t.pending_out, n, e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, 0 === t.pending && (t.pending_out = 0))
                    }

                    function te(e, t) { a._tr_flush_block(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, ee(e.strm) }

                    function ne(e, t) { e.pending_buf[e.pending++] = t }

                    function ie(e, t) { e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t }

                    function re(e, t) {
                        var n, i, r = e.max_chain_length,
                            a = e.strstart,
                            s = e.prev_length,
                            o = e.nice_match,
                            l = e.strstart > e.w_size - O ? e.strstart - (e.w_size - O) : 0,
                            h = e.window,
                            c = e.w_mask,
                            u = e.prev,
                            d = e.strstart + F,
                            f = h[a + s - 1],
                            p = h[a + s];
                        e.prev_length >= e.good_match && (r >>= 2), o > e.lookahead && (o = e.lookahead);
                        do {
                            if (h[(n = t) + s] === p && h[n + s - 1] === f && h[n] === h[a] && h[++n] === h[a + 1]) {
                                a += 2, n++;
                                do {} while (h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && h[++a] === h[++n] && a < d);
                                if (i = F - (d - a), a = d - F, i > s) {
                                    if (e.match_start = t, s = i, i >= o) break;
                                    f = h[a + s - 1], p = h[a + s]
                                }
                            }
                        } while ((t = u[t & c]) > l && 0 != --r);
                        return s <= e.lookahead ? s : e.lookahead
                    }

                    function ae(e) {
                        var t, n, i, a, l, h, c, u, d, f, p = e.w_size;
                        do {
                            if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= p + (p - O)) {
                                r.arraySet(e.window, e.window, p, p, 0), e.match_start -= p, e.strstart -= p, e.block_start -= p, n = e.hash_size, t = n;
                                do { i = e.head[--t], e.head[t] = i >= p ? i - p : 0 } while (--n);
                                t = n = p;
                                do { i = e.prev[--t], e.prev[t] = i >= p ? i - p : 0 } while (--n);
                                a += p
                            }
                            if (0 === e.strm.avail_in) break;
                            if (h = e.strm, c = e.window, u = e.strstart + e.lookahead, d = a, f = void 0, (f = h.avail_in) > d && (f = d), n = 0 === f ? 0 : (h.avail_in -= f, r.arraySet(c, h.input, h.next_in, f, u), 1 === h.state.wrap ? h.adler = s(h.adler, c, f, u) : 2 === h.state.wrap && (h.adler = o(h.adler, c, f, u)), h.next_in += f, h.total_in += f, f), e.lookahead += n, e.lookahead + e.insert >= D)
                                for (l = e.strstart - e.insert, e.ins_h = e.window[l], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[l + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[l + D - 1]) & e.hash_mask, e.prev[l & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = l, l++, e.insert--, !(e.lookahead + e.insert < D)););
                        } while (e.lookahead < O && 0 !== e.strm.avail_in)
                    }

                    function se(e, t) {
                        for (var n, i;;) {
                            if (e.lookahead < O) { if (ae(e), e.lookahead < O && t === h) return X; if (0 === e.lookahead) break }
                            if (n = 0, e.lookahead >= D && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + D - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), 0 !== n && e.strstart - n <= e.w_size - O && (e.match_length = re(e, n)), e.match_length >= D)
                                if (i = a._tr_tally(e, e.strstart - e.match_start, e.match_length - D), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= D) {
                                    e.match_length--;
                                    do { e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + D - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart } while (0 != --e.match_length);
                                    e.strstart++
                                } else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
                            else i = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
                            if (i && (te(e, !1), 0 === e.strm.avail_out)) return X
                        }
                        return e.insert = e.strstart < D - 1 ? e.strstart : D - 1, t === d ? (te(e, !0), 0 === e.strm.avail_out ? W : $) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? X : G
                    }

                    function oe(e, t) {
                        for (var n, i, r;;) {
                            if (e.lookahead < O) { if (ae(e), e.lookahead < O && t === h) return X; if (0 === e.lookahead) break }
                            if (n = 0, e.lookahead >= D && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + D - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = D - 1, 0 !== n && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - O && (e.match_length = re(e, n), e.match_length <= 5 && (e.strategy === y || e.match_length === D && e.strstart - e.match_start > 4096) && (e.match_length = D - 1)), e.prev_length >= D && e.match_length <= e.prev_length) {
                                r = e.strstart + e.lookahead - D, i = a._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - D), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
                                do {++e.strstart <= r && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + D - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart) } while (0 != --e.prev_length);
                                if (e.match_available = 0, e.match_length = D - 1, e.strstart++, i && (te(e, !1), 0 === e.strm.avail_out)) return X
                            } else if (e.match_available) { if ((i = a._tr_tally(e, 0, e.window[e.strstart - 1])) && te(e, !1), e.strstart++, e.lookahead--, 0 === e.strm.avail_out) return X } else e.match_available = 1, e.strstart++, e.lookahead--
                        }
                        return e.match_available && (i = a._tr_tally(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < D - 1 ? e.strstart : D - 1, t === d ? (te(e, !0), 0 === e.strm.avail_out ? W : $) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? X : G
                    }

                    function le(e, t, n, i, r) { this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = i, this.func = r }

                    function he() { this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = E, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new r.Buf16(2 * B), this.dyn_dtree = new r.Buf16(2 * (2 * A + 1)), this.bl_tree = new r.Buf16(2 * (2 * I + 1)), J(this.dyn_ltree), J(this.dyn_dtree), J(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new r.Buf16(L + 1), this.heap = new r.Buf16(2 * T + 1), J(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new r.Buf16(2 * T + 1), J(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0 }

                    function ce(e) { var t; return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = z, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? j : q, e.adler = 2 === t.wrap ? 0 : 1, t.last_flush = h, a._tr_init(t), p) : V(e, _) }

                    function ue(e) { var t, n = ce(e); return n === p && ((t = e.state).window_size = 2 * t.w_size, J(t.head), t.max_lazy_match = i[t.level].max_lazy, t.good_match = i[t.level].good_length, t.nice_match = i[t.level].nice_length, t.max_chain_length = i[t.level].max_chain, t.strstart = 0, t.block_start = 0, t.lookahead = 0, t.insert = 0, t.match_length = t.prev_length = D - 1, t.match_available = 0, t.ins_h = 0), n }

                    function de(e, t, n, i, a, s) {
                        if (!e) return _;
                        var o = 1;
                        if (t === w && (t = 6), i < 0 ? (o = 0, i = -i) : i > 15 && (o = 2, i -= 16), a < 1 || a > C || n !== E || i < 8 || i > 15 || t < 0 || t > 9 || s < 0 || s > x) return V(e, _);
                        8 === i && (i = 9);
                        var l = new he;
                        return e.state = l, l.strm = e, l.wrap = o, l.gzhead = null, l.w_bits = i, l.w_size = 1 << l.w_bits, l.w_mask = l.w_size - 1, l.hash_bits = a + 7, l.hash_size = 1 << l.hash_bits, l.hash_mask = l.hash_size - 1, l.hash_shift = ~~((l.hash_bits + D - 1) / D), l.window = new r.Buf8(2 * l.w_size), l.head = new r.Buf16(l.hash_size), l.prev = new r.Buf16(l.w_size), l.lit_bufsize = 1 << a + 6, l.pending_buf_size = 4 * l.lit_bufsize, l.pending_buf = new r.Buf8(l.pending_buf_size), l.d_buf = 1 * l.lit_bufsize, l.l_buf = 3 * l.lit_bufsize, l.level = t, l.strategy = s, l.method = n, ue(e)
                    }
                    i = [new le(0, 0, 0, 0, function(e, t) {
                        var n = 65535;
                        for (n > e.pending_buf_size - 5 && (n = e.pending_buf_size - 5);;) {
                            if (e.lookahead <= 1) { if (ae(e), 0 === e.lookahead && t === h) return X; if (0 === e.lookahead) break }
                            e.strstart += e.lookahead, e.lookahead = 0;
                            var i = e.block_start + n;
                            if ((0 === e.strstart || e.strstart >= i) && (e.lookahead = e.strstart - i, e.strstart = i, te(e, !1), 0 === e.strm.avail_out)) return X;
                            if (e.strstart - e.block_start >= e.w_size - O && (te(e, !1), 0 === e.strm.avail_out)) return X
                        }
                        return e.insert = 0, t === d ? (te(e, !0), 0 === e.strm.avail_out ? W : $) : (e.strstart > e.block_start && (te(e, !1), e.strm.avail_out), X)
                    }), new le(4, 4, 8, 4, se), new le(4, 5, 16, 8, se), new le(4, 6, 32, 32, se), new le(4, 4, 16, 16, oe), new le(8, 16, 32, 32, oe), new le(8, 16, 128, 128, oe), new le(8, 32, 128, 256, oe), new le(32, 128, 258, 1024, oe), new le(32, 258, 258, 4096, oe)], n.deflateInit = function(e, t) { return de(e, t, E, N, M, S) }, n.deflateInit2 = de, n.deflateReset = ue, n.deflateResetKeep = ce, n.deflateSetHeader = function(e, t) { return e && e.state ? 2 !== e.state.wrap ? _ : (e.state.gzhead = t, p) : _ }, n.deflate = function(e, t) {
                        var n, r, s, l;
                        if (!e || !e.state || t > f || t < 0) return e ? V(e, _) : _;
                        if (r = e.state, !e.output || !e.input && 0 !== e.avail_in || r.status === Y && t !== d) return V(e, 0 === e.avail_out ? v : _);
                        if (r.strm = e, n = r.last_flush, r.last_flush = t, r.status === j)
                            if (2 === r.wrap) e.adler = 0, ne(r, 31), ne(r, 139), ne(r, 8), r.gzhead ? (ne(r, (r.gzhead.text ? 1 : 0) + (r.gzhead.hcrc ? 2 : 0) + (r.gzhead.extra ? 4 : 0) + (r.gzhead.name ? 8 : 0) + (r.gzhead.comment ? 16 : 0)), ne(r, 255 & r.gzhead.time), ne(r, r.gzhead.time >> 8 & 255), ne(r, r.gzhead.time >> 16 & 255), ne(r, r.gzhead.time >> 24 & 255), ne(r, 9 === r.level ? 2 : r.strategy >= b || r.level < 2 ? 4 : 0), ne(r, 255 & r.gzhead.os), r.gzhead.extra && r.gzhead.extra.length && (ne(r, 255 & r.gzhead.extra.length), ne(r, r.gzhead.extra.length >> 8 & 255)), r.gzhead.hcrc && (e.adler = o(e.adler, r.pending_buf, r.pending, 0)), r.gzindex = 0, r.status = P) : (ne(r, 0), ne(r, 0), ne(r, 0), ne(r, 0), ne(r, 0), ne(r, 9 === r.level ? 2 : r.strategy >= b || r.level < 2 ? 4 : 0), ne(r, K), r.status = q);
                            else {
                                var g = E + (r.w_bits - 8 << 4) << 8,
                                    w = -1;
                                w = r.strategy >= b || r.level < 2 ? 0 : r.level < 6 ? 1 : 6 === r.level ? 2 : 3, g |= w << 6, 0 !== r.strstart && (g |= R), g += 31 - g % 31, r.status = q, ie(r, g), 0 !== r.strstart && (ie(r, e.adler >>> 16), ie(r, 65535 & e.adler)), e.adler = 1
                            }
                        if (r.status === P)
                            if (r.gzhead.extra) {
                                for (s = r.pending; r.gzindex < (65535 & r.gzhead.extra.length) && (r.pending !== r.pending_buf_size || (r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), ee(e), s = r.pending, r.pending !== r.pending_buf_size));) ne(r, 255 & r.gzhead.extra[r.gzindex]), r.gzindex++;
                                r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), r.gzindex === r.gzhead.extra.length && (r.gzindex = 0, r.status = U)
                            } else r.status = U;
                        if (r.status === U)
                            if (r.gzhead.name) {
                                s = r.pending;
                                do {
                                    if (r.pending === r.pending_buf_size && (r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), ee(e), s = r.pending, r.pending === r.pending_buf_size)) { l = 1; break }
                                    l = r.gzindex < r.gzhead.name.length ? 255 & r.gzhead.name.charCodeAt(r.gzindex++) : 0, ne(r, l)
                                } while (0 !== l);
                                r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), 0 === l && (r.gzindex = 0, r.status = Z)
                            } else r.status = Z;
                        if (r.status === Z)
                            if (r.gzhead.comment) {
                                s = r.pending;
                                do {
                                    if (r.pending === r.pending_buf_size && (r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), ee(e), s = r.pending, r.pending === r.pending_buf_size)) { l = 1; break }
                                    l = r.gzindex < r.gzhead.comment.length ? 255 & r.gzhead.comment.charCodeAt(r.gzindex++) : 0, ne(r, l)
                                } while (0 !== l);
                                r.gzhead.hcrc && r.pending > s && (e.adler = o(e.adler, r.pending_buf, r.pending - s, s)), 0 === l && (r.status = H)
                            } else r.status = H;
                        if (r.status === H && (r.gzhead.hcrc ? (r.pending + 2 > r.pending_buf_size && ee(e), r.pending + 2 <= r.pending_buf_size && (ne(r, 255 & e.adler), ne(r, e.adler >> 8 & 255), e.adler = 0, r.status = q)) : r.status = q), 0 !== r.pending) { if (ee(e), 0 === e.avail_out) return r.last_flush = -1, p } else if (0 === e.avail_in && Q(t) <= Q(n) && t !== d) return V(e, v);
                        if (r.status === Y && 0 !== e.avail_in) return V(e, v);
                        if (0 !== e.avail_in || 0 !== r.lookahead || t !== h && r.status !== Y) {
                            var y = r.strategy === b ? function(e, t) { for (var n;;) { if (0 === e.lookahead && (ae(e), 0 === e.lookahead)) { if (t === h) return X; break } if (e.match_length = 0, n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (te(e, !1), 0 === e.strm.avail_out)) return X } return e.insert = 0, t === d ? (te(e, !0), 0 === e.strm.avail_out ? W : $) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? X : G }(r, t) : r.strategy === k ? function(e, t) {
                                for (var n, i, r, s, o = e.window;;) {
                                    if (e.lookahead <= F) { if (ae(e), e.lookahead <= F && t === h) return X; if (0 === e.lookahead) break }
                                    if (e.match_length = 0, e.lookahead >= D && e.strstart > 0 && (r = e.strstart - 1, (i = o[r]) === o[++r] && i === o[++r] && i === o[++r])) {
                                        s = e.strstart + F;
                                        do {} while (i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && i === o[++r] && r < s);
                                        e.match_length = F - (s - r), e.match_length > e.lookahead && (e.match_length = e.lookahead)
                                    }
                                    if (e.match_length >= D ? (n = a._tr_tally(e, 1, e.match_length - D), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (te(e, !1), 0 === e.strm.avail_out)) return X
                                }
                                return e.insert = 0, t === d ? (te(e, !0), 0 === e.strm.avail_out ? W : $) : e.last_lit && (te(e, !1), 0 === e.strm.avail_out) ? X : G
                            }(r, t) : i[r.level].func(r, t);
                            if (y !== W && y !== $ || (r.status = Y), y === X || y === W) return 0 === e.avail_out && (r.last_flush = -1), p;
                            if (y === G && (t === c ? a._tr_align(r) : t !== f && (a._tr_stored_block(r, 0, 0, !1), t === u && (J(r.head), 0 === r.lookahead && (r.strstart = 0, r.block_start = 0, r.insert = 0))), ee(e), 0 === e.avail_out)) return r.last_flush = -1, p
                        }
                        return t !== d ? p : r.wrap <= 0 ? m : (2 === r.wrap ? (ne(r, 255 & e.adler), ne(r, e.adler >> 8 & 255), ne(r, e.adler >> 16 & 255), ne(r, e.adler >> 24 & 255), ne(r, 255 & e.total_in), ne(r, e.total_in >> 8 & 255), ne(r, e.total_in >> 16 & 255), ne(r, e.total_in >> 24 & 255)) : (ie(r, e.adler >>> 16), ie(r, 65535 & e.adler)), ee(e), r.wrap > 0 && (r.wrap = -r.wrap), 0 !== r.pending ? p : m)
                    }, n.deflateEnd = function(e) { var t; return e && e.state ? (t = e.state.status) !== j && t !== P && t !== U && t !== Z && t !== H && t !== q && t !== Y ? V(e, _) : (e.state = null, t === q ? V(e, g) : p) : _ }, n.deflateSetDictionary = function(e, t) {
                        var n, i, a, o, l, h, c, u, d = t.length;
                        if (!e || !e.state) return _;
                        if (n = e.state, 2 === (o = n.wrap) || 1 === o && n.status !== j || n.lookahead) return _;
                        for (1 === o && (e.adler = s(e.adler, t, d, 0)), n.wrap = 0, d >= n.w_size && (0 === o && (J(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0), u = new r.Buf8(n.w_size), r.arraySet(u, t, d - n.w_size, n.w_size, 0), t = u, d = n.w_size), l = e.avail_in, h = e.next_in, c = e.input, e.avail_in = d, e.next_in = 0, e.input = t, ae(n); n.lookahead >= D;) {
                            i = n.strstart, a = n.lookahead - (D - 1);
                            do { n.ins_h = (n.ins_h << n.hash_shift ^ n.window[i + D - 1]) & n.hash_mask, n.prev[i & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = i, i++ } while (--a);
                            n.strstart = i, n.lookahead = D - 1, ae(n)
                        }
                        return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = D - 1, n.match_available = 0, e.next_in = h, e.input = c, e.avail_in = l, n.wrap = o, p
                    }, n.deflateInfo = "pako deflate (from Nodeca project)"
                }, { "../utils/common": 1, "./adler32": 3, "./crc32": 4, "./messages": 6, "./trees": 7 }],
                6: [function(e, t, n) { t.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" } }, {}],
                7: [function(e, t, n) {
                    var i = e("../utils/common"),
                        r = 4,
                        a = 0,
                        s = 1,
                        o = 2;

                    function l(e) { for (var t = e.length; --t >= 0;) e[t] = 0 }
                    var h = 0,
                        c = 1,
                        u = 2,
                        d = 29,
                        f = 256,
                        p = f + 1 + d,
                        m = 30,
                        _ = 19,
                        g = 2 * p + 1,
                        v = 15,
                        w = 16,
                        y = 7,
                        b = 256,
                        k = 16,
                        x = 17,
                        S = 18,
                        z = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0],
                        E = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
                        C = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
                        N = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
                        M = new Array(2 * (p + 2));
                    l(M);
                    var T = new Array(2 * m);
                    l(T);
                    var A = new Array(512);
                    l(A);
                    var I = new Array(256);
                    l(I);
                    var B = new Array(d);
                    l(B);
                    var L, D, F, O = new Array(m);

                    function R(e, t, n, i, r) { this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = i, this.max_length = r, this.has_stree = e && e.length }

                    function j(e, t) { this.dyn_tree = e, this.max_code = 0, this.stat_desc = t }

                    function P(e) { return e < 256 ? A[e] : A[256 + (e >>> 7)] }

                    function U(e, t) { e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255 }

                    function Z(e, t, n) { e.bi_valid > w - n ? (e.bi_buf |= t << e.bi_valid & 65535, U(e, e.bi_buf), e.bi_buf = t >> w - e.bi_valid, e.bi_valid += n - w) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n) }

                    function H(e, t, n) { Z(e, n[2 * t], n[2 * t + 1]) }

                    function q(e, t) {
                        var n = 0;
                        do { n |= 1 & e, e >>>= 1, n <<= 1 } while (--t > 0);
                        return n >>> 1
                    }

                    function Y(e, t, n) {
                        var i, r, a = new Array(v + 1),
                            s = 0;
                        for (i = 1; i <= v; i++) a[i] = s = s + n[i - 1] << 1;
                        for (r = 0; r <= t; r++) {
                            var o = e[2 * r + 1];
                            0 !== o && (e[2 * r] = q(a[o]++, o))
                        }
                    }

                    function X(e) {
                        var t;
                        for (t = 0; t < p; t++) e.dyn_ltree[2 * t] = 0;
                        for (t = 0; t < m; t++) e.dyn_dtree[2 * t] = 0;
                        for (t = 0; t < _; t++) e.bl_tree[2 * t] = 0;
                        e.dyn_ltree[2 * b] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0
                    }

                    function G(e) { e.bi_valid > 8 ? U(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0 }

                    function W(e, t, n, i) {
                        var r = 2 * t,
                            a = 2 * n;
                        return e[r] < e[a] || e[r] === e[a] && i[t] <= i[n]
                    }

                    function $(e, t, n) {
                        for (var i = e.heap[n], r = n << 1; r <= e.heap_len && (r < e.heap_len && W(t, e.heap[r + 1], e.heap[r], e.depth) && r++, !W(t, i, e.heap[r], e.depth));) e.heap[n] = e.heap[r], n = r, r <<= 1;
                        e.heap[n] = i
                    }

                    function K(e, t, n) {
                        var i, r, a, s, o = 0;
                        if (0 !== e.last_lit)
                            do { i = e.pending_buf[e.d_buf + 2 * o] << 8 | e.pending_buf[e.d_buf + 2 * o + 1], r = e.pending_buf[e.l_buf + o], o++, 0 === i ? H(e, r, t) : (a = I[r], H(e, a + f + 1, t), 0 !== (s = z[a]) && (r -= B[a], Z(e, r, s)), a = P(--i), H(e, a, n), 0 !== (s = E[a]) && (i -= O[a], Z(e, i, s))) } while (o < e.last_lit);
                        H(e, b, t)
                    }

                    function V(e, t) {
                        var n, i, r, a = t.dyn_tree,
                            s = t.stat_desc.static_tree,
                            o = t.stat_desc.has_stree,
                            l = t.stat_desc.elems,
                            h = -1;
                        for (e.heap_len = 0, e.heap_max = g, n = 0; n < l; n++) 0 !== a[2 * n] ? (e.heap[++e.heap_len] = h = n, e.depth[n] = 0) : a[2 * n + 1] = 0;
                        for (; e.heap_len < 2;) r = e.heap[++e.heap_len] = h < 2 ? ++h : 0, a[2 * r] = 1, e.depth[r] = 0, e.opt_len--, o && (e.static_len -= s[2 * r + 1]);
                        for (t.max_code = h, n = e.heap_len >> 1; n >= 1; n--) $(e, a, n);
                        r = l;
                        do { n = e.heap[1], e.heap[1] = e.heap[e.heap_len--], $(e, a, 1), i = e.heap[1], e.heap[--e.heap_max] = n, e.heap[--e.heap_max] = i, a[2 * r] = a[2 * n] + a[2 * i], e.depth[r] = (e.depth[n] >= e.depth[i] ? e.depth[n] : e.depth[i]) + 1, a[2 * n + 1] = a[2 * i + 1] = r, e.heap[1] = r++, $(e, a, 1) } while (e.heap_len >= 2);
                        e.heap[--e.heap_max] = e.heap[1],
                            function(e, t) {
                                var n, i, r, a, s, o, l = t.dyn_tree,
                                    h = t.max_code,
                                    c = t.stat_desc.static_tree,
                                    u = t.stat_desc.has_stree,
                                    d = t.stat_desc.extra_bits,
                                    f = t.stat_desc.extra_base,
                                    p = t.stat_desc.max_length,
                                    m = 0;
                                for (a = 0; a <= v; a++) e.bl_count[a] = 0;
                                for (l[2 * e.heap[e.heap_max] + 1] = 0, n = e.heap_max + 1; n < g; n++) i = e.heap[n], (a = l[2 * l[2 * i + 1] + 1] + 1) > p && (a = p, m++), l[2 * i + 1] = a, i > h || (e.bl_count[a]++, s = 0, i >= f && (s = d[i - f]), o = l[2 * i], e.opt_len += o * (a + s), u && (e.static_len += o * (c[2 * i + 1] + s)));
                                if (0 !== m) {
                                    do {
                                        for (a = p - 1; 0 === e.bl_count[a];) a--;
                                        e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[p]--, m -= 2
                                    } while (m > 0);
                                    for (a = p; 0 !== a; a--)
                                        for (i = e.bl_count[a]; 0 !== i;)(r = e.heap[--n]) > h || (l[2 * r + 1] !== a && (e.opt_len += (a - l[2 * r + 1]) * l[2 * r], l[2 * r + 1] = a), i--)
                                }
                            }(e, t), Y(a, h, e.bl_count)
                    }

                    function Q(e, t, n) {
                        var i, r, a = -1,
                            s = t[1],
                            o = 0,
                            l = 7,
                            h = 4;
                        for (0 === s && (l = 138, h = 3), t[2 * (n + 1) + 1] = 65535, i = 0; i <= n; i++) r = s, s = t[2 * (i + 1) + 1], ++o < l && r === s || (o < h ? e.bl_tree[2 * r] += o : 0 !== r ? (r !== a && e.bl_tree[2 * r]++, e.bl_tree[2 * k]++) : o <= 10 ? e.bl_tree[2 * x]++ : e.bl_tree[2 * S]++, o = 0, a = r, 0 === s ? (l = 138, h = 3) : r === s ? (l = 6, h = 3) : (l = 7, h = 4))
                    }

                    function J(e, t, n) {
                        var i, r, a = -1,
                            s = t[1],
                            o = 0,
                            l = 7,
                            h = 4;
                        for (0 === s && (l = 138, h = 3), i = 0; i <= n; i++)
                            if (r = s, s = t[2 * (i + 1) + 1], !(++o < l && r === s)) {
                                if (o < h)
                                    do { H(e, r, e.bl_tree) } while (0 != --o);
                                else 0 !== r ? (r !== a && (H(e, r, e.bl_tree), o--), H(e, k, e.bl_tree), Z(e, o - 3, 2)) : o <= 10 ? (H(e, x, e.bl_tree), Z(e, o - 3, 3)) : (H(e, S, e.bl_tree), Z(e, o - 11, 7));
                                o = 0, a = r, 0 === s ? (l = 138, h = 3) : r === s ? (l = 6, h = 3) : (l = 7, h = 4)
                            }
                    }
                    l(O);
                    var ee = !1;

                    function te(e, t, n, r) {
                        Z(e, (h << 1) + (r ? 1 : 0), 3),
                            function(e, t, n, r) { G(e), r && (U(e, n), U(e, ~n)), i.arraySet(e.pending_buf, e.window, t, n, e.pending), e.pending += n }(e, t, n, !0)
                    }
                    n._tr_init = function(e) {
                        ee || (function() {
                            var e, t, n, i, r, a = new Array(v + 1);
                            for (n = 0, i = 0; i < d - 1; i++)
                                for (B[i] = n, e = 0; e < 1 << z[i]; e++) I[n++] = i;
                            for (I[n - 1] = i, r = 0, i = 0; i < 16; i++)
                                for (O[i] = r, e = 0; e < 1 << E[i]; e++) A[r++] = i;
                            for (r >>= 7; i < m; i++)
                                for (O[i] = r << 7, e = 0; e < 1 << E[i] - 7; e++) A[256 + r++] = i;
                            for (t = 0; t <= v; t++) a[t] = 0;
                            for (e = 0; e <= 143;) M[2 * e + 1] = 8, e++, a[8]++;
                            for (; e <= 255;) M[2 * e + 1] = 9, e++, a[9]++;
                            for (; e <= 279;) M[2 * e + 1] = 7, e++, a[7]++;
                            for (; e <= 287;) M[2 * e + 1] = 8, e++, a[8]++;
                            for (Y(M, p + 1, a), e = 0; e < m; e++) T[2 * e + 1] = 5, T[2 * e] = q(e, 5);
                            L = new R(M, z, f + 1, p, v), D = new R(T, E, 0, m, v), F = new R(new Array(0), C, 0, _, y)
                        }(), ee = !0), e.l_desc = new j(e.dyn_ltree, L), e.d_desc = new j(e.dyn_dtree, D), e.bl_desc = new j(e.bl_tree, F), e.bi_buf = 0, e.bi_valid = 0, X(e)
                    }, n._tr_stored_block = te, n._tr_flush_block = function(e, t, n, i) {
                        var l, h, d = 0;
                        e.level > 0 ? (e.strm.data_type === o && (e.strm.data_type = function(e) {
                            var t, n = 4093624447;
                            for (t = 0; t <= 31; t++, n >>>= 1)
                                if (1 & n && 0 !== e.dyn_ltree[2 * t]) return a;
                            if (0 !== e.dyn_ltree[18] || 0 !== e.dyn_ltree[20] || 0 !== e.dyn_ltree[26]) return s;
                            for (t = 32; t < f; t++)
                                if (0 !== e.dyn_ltree[2 * t]) return s;
                            return a
                        }(e)), V(e, e.l_desc), V(e, e.d_desc), d = function(e) { var t; for (Q(e, e.dyn_ltree, e.l_desc.max_code), Q(e, e.dyn_dtree, e.d_desc.max_code), V(e, e.bl_desc), t = _ - 1; t >= 3 && 0 === e.bl_tree[2 * N[t] + 1]; t--); return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t }(e), l = e.opt_len + 3 + 7 >>> 3, (h = e.static_len + 3 + 7 >>> 3) <= l && (l = h)) : l = h = n + 5, n + 4 <= l && -1 !== t ? te(e, t, n, i) : e.strategy === r || h === l ? (Z(e, (c << 1) + (i ? 1 : 0), 3), K(e, M, T)) : (Z(e, (u << 1) + (i ? 1 : 0), 3), function(e, t, n, i) {
                            var r;
                            for (Z(e, t - 257, 5), Z(e, n - 1, 5), Z(e, i - 4, 4), r = 0; r < i; r++) Z(e, e.bl_tree[2 * N[r] + 1], 3);
                            J(e, e.dyn_ltree, t - 1), J(e, e.dyn_dtree, n - 1)
                        }(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, d + 1), K(e, e.dyn_ltree, e.dyn_dtree)), X(e), i && G(e)
                    }, n._tr_tally = function(e, t, n) { return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & n, e.last_lit++, 0 === t ? e.dyn_ltree[2 * n]++ : (e.matches++, t--, e.dyn_ltree[2 * (I[n] + f + 1)]++, e.dyn_dtree[2 * P(t)]++), e.last_lit === e.lit_bufsize - 1 }, n._tr_align = function(e) {
                        Z(e, c << 1, 3), H(e, b, M),
                            function(e) { 16 === e.bi_valid ? (U(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8) }(e)
                    }
                }, { "../utils/common": 1 }],
                8: [function(e, t, n) { t.exports = function() { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0 } }, {}],
                "/lib/deflate.js": [function(e, t, n) {
                    var i = e("./zlib/deflate"),
                        r = e("./utils/common"),
                        a = e("./utils/strings"),
                        s = e("./zlib/messages"),
                        o = e("./zlib/zstream"),
                        l = Object.prototype.toString,
                        h = 0,
                        c = -1,
                        u = 0,
                        d = 8;

                    function f(e) {
                        if (!(this instanceof f)) return new f(e);
                        this.options = r.assign({ level: c, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: u, to: "" }, e || {});
                        var t = this.options;
                        t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new o, this.strm.avail_out = 0;
                        var n = i.deflateInit2(this.strm, t.level, t.method, t.windowBits, t.memLevel, t.strategy);
                        if (n !== h) throw new Error(s[n]);
                        if (t.header && i.deflateSetHeader(this.strm, t.header), t.dictionary) {
                            var p;
                            if (p = "string" == typeof t.dictionary ? a.string2buf(t.dictionary) : "[object ArrayBuffer]" === l.call(t.dictionary) ? new Uint8Array(t.dictionary) : t.dictionary, (n = i.deflateSetDictionary(this.strm, p)) !== h) throw new Error(s[n]);
                            this._dict_set = !0
                        }
                    }

                    function p(e, t) { var n = new f(t); if (n.push(e, !0), n.err) throw n.msg || s[n.err]; return n.result }
                    f.prototype.push = function(e, t) {
                        var n, s, o = this.strm,
                            c = this.options.chunkSize;
                        if (this.ended) return !1;
                        s = t === ~~t ? t : !0 === t ? 4 : 0, "string" == typeof e ? o.input = a.string2buf(e) : "[object ArrayBuffer]" === l.call(e) ? o.input = new Uint8Array(e) : o.input = e, o.next_in = 0, o.avail_in = o.input.length;
                        do {
                            if (0 === o.avail_out && (o.output = new r.Buf8(c), o.next_out = 0, o.avail_out = c), 1 !== (n = i.deflate(o, s)) && n !== h) return this.onEnd(n), this.ended = !0, !1;
                            0 !== o.avail_out && (0 !== o.avail_in || 4 !== s && 2 !== s) || ("string" === this.options.to ? this.onData(a.buf2binstring(r.shrinkBuf(o.output, o.next_out))) : this.onData(r.shrinkBuf(o.output, o.next_out)))
                        } while ((o.avail_in > 0 || 0 === o.avail_out) && 1 !== n);
                        return 4 === s ? (n = i.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === h) : 2 !== s || (this.onEnd(h), o.avail_out = 0, !0)
                    }, f.prototype.onData = function(e) { this.chunks.push(e) }, f.prototype.onEnd = function(e) { e === h && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = r.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg }, n.Deflate = f, n.deflate = p, n.deflateRaw = function(e, t) { return (t = t || {}).raw = !0, p(e, t) }, n.gzip = function(e, t) { return (t = t || {}).gzip = !0, p(e, t) }
                }, { "./utils/common": 1, "./utils/strings": 2, "./zlib/deflate": 5, "./zlib/messages": 6, "./zlib/zstream": 8 }]
            }, {}, [])("/lib/deflate.js")
        }).deflate, Z(function(e, t) {
            e.exports = function e(t, n, i) {
                function r(s, o) {
                    if (!n[s]) {
                        if (!t[s]) { var l = U; if (!o && l) return l(s, !0); if (a) return a(s, !0); var h = new Error("Cannot find module '" + s + "'"); throw h.code = "MODULE_NOT_FOUND", h }
                        var c = n[s] = { exports: {} };
                        t[s][0].call(c.exports, function(e) { var n = t[s][1][e]; return r(n || e) }, c, c.exports, e, t, n, i)
                    }
                    return n[s].exports
                }
                for (var a = U, s = 0; s < i.length; s++) r(i[s]);
                return r
            }({
                1: [function(e, t, n) {
                    var i = "undefined" != typeof Uint8Array && "undefined" != typeof Uint16Array && "undefined" != typeof Int32Array;

                    function r(e, t) { return Object.prototype.hasOwnProperty.call(e, t) }
                    n.assign = function(e) { for (var t = Array.prototype.slice.call(arguments, 1); t.length;) { var n = t.shift(); if (n) { if ("object" != typeof n) throw new TypeError(n + "must be non-object"); for (var i in n) r(n, i) && (e[i] = n[i]) } } return e }, n.shrinkBuf = function(e, t) { return e.length === t ? e : e.subarray ? e.subarray(0, t) : (e.length = t, e) };
                    var a = {
                            arraySet: function(e, t, n, i, r) {
                                if (t.subarray && e.subarray) e.set(t.subarray(n, n + i), r);
                                else
                                    for (var a = 0; a < i; a++) e[r + a] = t[n + a]
                            },
                            flattenChunks: function(e) { var t, n, i, r, a, s; for (i = 0, t = 0, n = e.length; t < n; t++) i += e[t].length; for (s = new Uint8Array(i), r = 0, t = 0, n = e.length; t < n; t++) a = e[t], s.set(a, r), r += a.length; return s }
                        },
                        s = { arraySet: function(e, t, n, i, r) { for (var a = 0; a < i; a++) e[r + a] = t[n + a] }, flattenChunks: function(e) { return [].concat.apply([], e) } };
                    n.setTyped = function(e) { e ? (n.Buf8 = Uint8Array, n.Buf16 = Uint16Array, n.Buf32 = Int32Array, n.assign(n, a)) : (n.Buf8 = Array, n.Buf16 = Array, n.Buf32 = Array, n.assign(n, s)) }, n.setTyped(i)
                }, {}],
                2: [function(e, t, n) {
                    var i = e("./common"),
                        r = !0,
                        a = !0;
                    try { String.fromCharCode.apply(null, [0]) } catch (e) { r = !1 }
                    try { String.fromCharCode.apply(null, new Uint8Array(1)) } catch (e) { a = !1 }
                    for (var s = new i.Buf8(256), o = 0; o < 256; o++) s[o] = o >= 252 ? 6 : o >= 248 ? 5 : o >= 240 ? 4 : o >= 224 ? 3 : o >= 192 ? 2 : 1;

                    function l(e, t) { if (t < 65534 && (e.subarray && a || !e.subarray && r)) return String.fromCharCode.apply(null, i.shrinkBuf(e, t)); for (var n = "", s = 0; s < t; s++) n += String.fromCharCode(e[s]); return n }
                    s[254] = s[254] = 1, n.string2buf = function(e) {
                        var t, n, r, a, s, o = e.length,
                            l = 0;
                        for (a = 0; a < o; a++) 55296 == (64512 & (n = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (r = e.charCodeAt(a + 1))) && (n = 65536 + (n - 55296 << 10) + (r - 56320), a++), l += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4;
                        for (t = new i.Buf8(l), s = 0, a = 0; s < l; a++) 55296 == (64512 & (n = e.charCodeAt(a))) && a + 1 < o && 56320 == (64512 & (r = e.charCodeAt(a + 1))) && (n = 65536 + (n - 55296 << 10) + (r - 56320), a++), n < 128 ? t[s++] = n : n < 2048 ? (t[s++] = 192 | n >>> 6, t[s++] = 128 | 63 & n) : n < 65536 ? (t[s++] = 224 | n >>> 12, t[s++] = 128 | n >>> 6 & 63, t[s++] = 128 | 63 & n) : (t[s++] = 240 | n >>> 18, t[s++] = 128 | n >>> 12 & 63, t[s++] = 128 | n >>> 6 & 63, t[s++] = 128 | 63 & n);
                        return t
                    }, n.buf2binstring = function(e) { return l(e, e.length) }, n.binstring2buf = function(e) { for (var t = new i.Buf8(e.length), n = 0, r = t.length; n < r; n++) t[n] = e.charCodeAt(n); return t }, n.buf2string = function(e, t) {
                        var n, i, r, a, o = t || e.length,
                            h = new Array(2 * o);
                        for (i = 0, n = 0; n < o;)
                            if ((r = e[n++]) < 128) h[i++] = r;
                            else if ((a = s[r]) > 4) h[i++] = 65533, n += a - 1;
                        else {
                            for (r &= 2 === a ? 31 : 3 === a ? 15 : 7; a > 1 && n < o;) r = r << 6 | 63 & e[n++], a--;
                            a > 1 ? h[i++] = 65533 : r < 65536 ? h[i++] = r : (r -= 65536, h[i++] = 55296 | r >> 10 & 1023, h[i++] = 56320 | 1023 & r)
                        }
                        return l(h, i)
                    }, n.utf8border = function(e, t) { var n; for ((t = t || e.length) > e.length && (t = e.length), n = t - 1; n >= 0 && 128 == (192 & e[n]);) n--; return n < 0 ? t : 0 === n ? t : n + s[e[n]] > t ? n : t }
                }, { "./common": 1 }],
                3: [function(e, t, n) {
                    t.exports = function(e, t, n, i) {
                        for (var r = 65535 & e | 0, a = e >>> 16 & 65535 | 0, s = 0; 0 !== n;) {
                            n -= s = n > 2e3 ? 2e3 : n;
                            do { r = r + t[i++] | 0, a = a + r | 0 } while (--s);
                            r %= 65521, a %= 65521
                        }
                        return r | a << 16 | 0
                    }
                }, {}],
                4: [function(e, t, n) { t.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 } }, {}],
                5: [function(e, t, n) {
                    var i = function() {
                        for (var e, t = [], n = 0; n < 256; n++) {
                            e = n;
                            for (var i = 0; i < 8; i++) e = 1 & e ? 3988292384 ^ e >>> 1 : e >>> 1;
                            t[n] = e
                        }
                        return t
                    }();
                    t.exports = function(e, t, n, r) {
                        var a = i,
                            s = r + n;
                        e ^= -1;
                        for (var o = r; o < s; o++) e = e >>> 8 ^ a[255 & (e ^ t[o])];
                        return -1 ^ e
                    }
                }, {}],
                6: [function(e, t, n) { t.exports = function() { this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1 } }, {}],
                7: [function(e, t, n) {
                    t.exports = function(e, t) {
                        var n, i, r, a, s, o, l, h, c, u, d, f, p, m, _, g, v, w, y, b, k, x, S, z, E;
                        n = e.state, i = e.next_in, z = e.input, r = i + (e.avail_in - 5), a = e.next_out, E = e.output, s = a - (t - e.avail_out), o = a + (e.avail_out - 257), l = n.dmax, h = n.wsize, c = n.whave, u = n.wnext, d = n.window, f = n.hold, p = n.bits, m = n.lencode, _ = n.distcode, g = (1 << n.lenbits) - 1, v = (1 << n.distbits) - 1;
                        e: do {
                            p < 15 && (f += z[i++] << p, p += 8, f += z[i++] << p, p += 8), w = m[f & g];
                            t: for (;;) {
                                if (f >>>= y = w >>> 24, p -= y, 0 == (y = w >>> 16 & 255)) E[a++] = 65535 & w;
                                else {
                                    if (!(16 & y)) {
                                        if (0 == (64 & y)) { w = m[(65535 & w) + (f & (1 << y) - 1)]; continue t }
                                        if (32 & y) { n.mode = 12; break e }
                                        e.msg = "invalid literal/length code", n.mode = 30;
                                        break e
                                    }
                                    b = 65535 & w, (y &= 15) && (p < y && (f += z[i++] << p, p += 8), b += f & (1 << y) - 1, f >>>= y, p -= y), p < 15 && (f += z[i++] << p, p += 8, f += z[i++] << p, p += 8), w = _[f & v];
                                    n: for (;;) {
                                        if (f >>>= y = w >>> 24, p -= y, !(16 & (y = w >>> 16 & 255))) {
                                            if (0 == (64 & y)) { w = _[(65535 & w) + (f & (1 << y) - 1)]; continue n }
                                            e.msg = "invalid distance code", n.mode = 30;
                                            break e
                                        }
                                        if (k = 65535 & w, p < (y &= 15) && (f += z[i++] << p, (p += 8) < y && (f += z[i++] << p, p += 8)), (k += f & (1 << y) - 1) > l) { e.msg = "invalid distance too far back", n.mode = 30; break e }
                                        if (f >>>= y, p -= y, k > (y = a - s)) {
                                            if ((y = k - y) > c && n.sane) { e.msg = "invalid distance too far back", n.mode = 30; break e }
                                            if (x = 0, S = d, 0 === u) {
                                                if (x += h - y, y < b) {
                                                    b -= y;
                                                    do { E[a++] = d[x++] } while (--y);
                                                    x = a - k, S = E
                                                }
                                            } else if (u < y) {
                                                if (x += h + u - y, (y -= u) < b) {
                                                    b -= y;
                                                    do { E[a++] = d[x++] } while (--y);
                                                    if (x = 0, u < b) {
                                                        b -= y = u;
                                                        do { E[a++] = d[x++] } while (--y);
                                                        x = a - k, S = E
                                                    }
                                                }
                                            } else if (x += u - y, y < b) {
                                                b -= y;
                                                do { E[a++] = d[x++] } while (--y);
                                                x = a - k, S = E
                                            }
                                            for (; b > 2;) E[a++] = S[x++], E[a++] = S[x++], E[a++] = S[x++], b -= 3;
                                            b && (E[a++] = S[x++], b > 1 && (E[a++] = S[x++]))
                                        } else {
                                            x = a - k;
                                            do { E[a++] = E[x++], E[a++] = E[x++], E[a++] = E[x++], b -= 3 } while (b > 2);
                                            b && (E[a++] = E[x++], b > 1 && (E[a++] = E[x++]))
                                        }
                                        break
                                    }
                                }
                                break
                            }
                        } while (i < r && a < o);
                        i -= b = p >> 3, f &= (1 << (p -= b << 3)) - 1, e.next_in = i, e.next_out = a, e.avail_in = i < r ? r - i + 5 : 5 - (i - r), e.avail_out = a < o ? o - a + 257 : 257 - (a - o), n.hold = f, n.bits = p
                    }
                }, {}],
                8: [function(e, t, n) {
                    var i = e("../utils/common"),
                        r = e("./adler32"),
                        a = e("./crc32"),
                        s = e("./inffast"),
                        o = e("./inftrees"),
                        l = 0,
                        h = 1,
                        c = 2,
                        u = 4,
                        d = 5,
                        f = 6,
                        p = 0,
                        m = 1,
                        _ = 2,
                        g = -2,
                        v = -3,
                        w = -4,
                        y = -5,
                        b = 8,
                        k = 1,
                        x = 2,
                        S = 3,
                        z = 4,
                        E = 5,
                        C = 6,
                        N = 7,
                        M = 8,
                        T = 9,
                        A = 10,
                        I = 11,
                        B = 12,
                        L = 13,
                        D = 14,
                        F = 15,
                        O = 16,
                        R = 17,
                        j = 18,
                        P = 19,
                        U = 20,
                        Z = 21,
                        H = 22,
                        q = 23,
                        Y = 24,
                        X = 25,
                        G = 26,
                        W = 27,
                        $ = 28,
                        K = 29,
                        V = 30,
                        Q = 31,
                        J = 32,
                        ee = 852,
                        te = 592,
                        ne = 15;

                    function ie(e) { return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24) }

                    function re() { this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new i.Buf16(320), this.work = new i.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0 }

                    function ae(e) { var t; return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = k, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new i.Buf32(ee), t.distcode = t.distdyn = new i.Buf32(te), t.sane = 1, t.back = -1, p) : g }

                    function se(e) { var t; return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, ae(e)) : g }

                    function oe(e, t) { var n, i; return e && e.state ? (i = e.state, t < 0 ? (n = 0, t = -t) : (n = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? g : (null !== i.window && i.wbits !== t && (i.window = null), i.wrap = n, i.wbits = t, se(e))) : g }

                    function le(e, t) { var n, i; return e ? (i = new re, e.state = i, i.window = null, (n = oe(e, t)) !== p && (e.state = null), n) : g }
                    var he, ce, ue = !0;

                    function de(e) {
                        if (ue) {
                            var t;
                            for (he = new i.Buf32(512), ce = new i.Buf32(32), t = 0; t < 144;) e.lens[t++] = 8;
                            for (; t < 256;) e.lens[t++] = 9;
                            for (; t < 280;) e.lens[t++] = 7;
                            for (; t < 288;) e.lens[t++] = 8;
                            for (o(h, e.lens, 0, 288, he, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
                            o(c, e.lens, 0, 32, ce, 0, e.work, { bits: 5 }), ue = !1
                        }
                        e.lencode = he, e.lenbits = 9, e.distcode = ce, e.distbits = 5
                    }

                    function fe(e, t, n, r) { var a, s = e.state; return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new i.Buf8(s.wsize)), r >= s.wsize ? (i.arraySet(s.window, t, n - s.wsize, s.wsize, 0), s.wnext = 0, s.whave = s.wsize) : ((a = s.wsize - s.wnext) > r && (a = r), i.arraySet(s.window, t, n - r, a, s.wnext), (r -= a) ? (i.arraySet(s.window, t, n - r, r, 0), s.wnext = r, s.whave = s.wsize) : (s.wnext += a, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += a))), 0 }
                    n.inflateReset = se, n.inflateReset2 = oe, n.inflateResetKeep = ae, n.inflateInit = function(e) { return le(e, ne) }, n.inflateInit2 = le, n.inflate = function(e, t) {
                        var n, ee, te, ne, re, ae, se, oe, le, he, ce, ue, pe, me, _e, ge, ve, we, ye, be, ke, xe, Se, ze, Ee = 0,
                            Ce = new i.Buf8(4),
                            Ne = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
                        if (!e || !e.state || !e.output || !e.input && 0 !== e.avail_in) return g;
                        (n = e.state).mode === B && (n.mode = L), re = e.next_out, te = e.output, se = e.avail_out, ne = e.next_in, ee = e.input, ae = e.avail_in, oe = n.hold, le = n.bits, he = ae, ce = se, xe = p;
                        e: for (;;) switch (n.mode) {
                            case k:
                                if (0 === n.wrap) { n.mode = L; break }
                                for (; le < 16;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if (2 & n.wrap && 35615 === oe) { n.check = 0, Ce[0] = 255 & oe, Ce[1] = oe >>> 8 & 255, n.check = a(n.check, Ce, 2, 0), oe = 0, le = 0, n.mode = x; break }
                                if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & oe) << 8) + (oe >> 8)) % 31) { e.msg = "incorrect header check", n.mode = V; break }
                                if ((15 & oe) !== b) { e.msg = "unknown compression method", n.mode = V; break }
                                if (le -= 4, ke = 8 + (15 & (oe >>>= 4)), 0 === n.wbits) n.wbits = ke;
                                else if (ke > n.wbits) { e.msg = "invalid window size", n.mode = V; break }
                                n.dmax = 1 << ke, e.adler = n.check = 1, n.mode = 512 & oe ? A : B, oe = 0, le = 0;
                                break;
                            case x:
                                for (; le < 16;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if (n.flags = oe, (255 & n.flags) !== b) { e.msg = "unknown compression method", n.mode = V; break }
                                if (57344 & n.flags) { e.msg = "unknown header flags set", n.mode = V; break }
                                n.head && (n.head.text = oe >> 8 & 1), 512 & n.flags && (Ce[0] = 255 & oe, Ce[1] = oe >>> 8 & 255, n.check = a(n.check, Ce, 2, 0)), oe = 0, le = 0, n.mode = S;
                            case S:
                                for (; le < 32;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                n.head && (n.head.time = oe), 512 & n.flags && (Ce[0] = 255 & oe, Ce[1] = oe >>> 8 & 255, Ce[2] = oe >>> 16 & 255, Ce[3] = oe >>> 24 & 255, n.check = a(n.check, Ce, 4, 0)), oe = 0, le = 0, n.mode = z;
                            case z:
                                for (; le < 16;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                n.head && (n.head.xflags = 255 & oe, n.head.os = oe >> 8), 512 & n.flags && (Ce[0] = 255 & oe, Ce[1] = oe >>> 8 & 255, n.check = a(n.check, Ce, 2, 0)), oe = 0, le = 0, n.mode = E;
                            case E:
                                if (1024 & n.flags) {
                                    for (; le < 16;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    n.length = oe, n.head && (n.head.extra_len = oe), 512 & n.flags && (Ce[0] = 255 & oe, Ce[1] = oe >>> 8 & 255, n.check = a(n.check, Ce, 2, 0)), oe = 0, le = 0
                                } else n.head && (n.head.extra = null);
                                n.mode = C;
                            case C:
                                if (1024 & n.flags && ((ue = n.length) > ae && (ue = ae), ue && (n.head && (ke = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), i.arraySet(n.head.extra, ee, ne, ue, ke)), 512 & n.flags && (n.check = a(n.check, ee, ue, ne)), ae -= ue, ne += ue, n.length -= ue), n.length)) break e;
                                n.length = 0, n.mode = N;
                            case N:
                                if (2048 & n.flags) {
                                    if (0 === ae) break e;
                                    ue = 0;
                                    do { ke = ee[ne + ue++], n.head && ke && n.length < 65536 && (n.head.name += String.fromCharCode(ke)) } while (ke && ue < ae);
                                    if (512 & n.flags && (n.check = a(n.check, ee, ue, ne)), ae -= ue, ne += ue, ke) break e
                                } else n.head && (n.head.name = null);
                                n.length = 0, n.mode = M;
                            case M:
                                if (4096 & n.flags) {
                                    if (0 === ae) break e;
                                    ue = 0;
                                    do { ke = ee[ne + ue++], n.head && ke && n.length < 65536 && (n.head.comment += String.fromCharCode(ke)) } while (ke && ue < ae);
                                    if (512 & n.flags && (n.check = a(n.check, ee, ue, ne)), ae -= ue, ne += ue, ke) break e
                                } else n.head && (n.head.comment = null);
                                n.mode = T;
                            case T:
                                if (512 & n.flags) {
                                    for (; le < 16;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    if (oe !== (65535 & n.check)) { e.msg = "header crc mismatch", n.mode = V; break }
                                    oe = 0, le = 0
                                }
                                n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = B;
                                break;
                            case A:
                                for (; le < 32;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                e.adler = n.check = ie(oe), oe = 0, le = 0, n.mode = I;
                            case I:
                                if (0 === n.havedict) return e.next_out = re, e.avail_out = se, e.next_in = ne, e.avail_in = ae, n.hold = oe, n.bits = le, _;
                                e.adler = n.check = 1, n.mode = B;
                            case B:
                                if (t === d || t === f) break e;
                            case L:
                                if (n.last) { oe >>>= 7 & le, le -= 7 & le, n.mode = W; break }
                                for (; le < 3;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                switch (n.last = 1 & oe, le -= 1, 3 & (oe >>>= 1)) {
                                    case 0:
                                        n.mode = D;
                                        break;
                                    case 1:
                                        if (de(n), n.mode = U, t === f) { oe >>>= 2, le -= 2; break e }
                                        break;
                                    case 2:
                                        n.mode = R;
                                        break;
                                    case 3:
                                        e.msg = "invalid block type", n.mode = V
                                }
                                oe >>>= 2, le -= 2;
                                break;
                            case D:
                                for (oe >>>= 7 & le, le -= 7 & le; le < 32;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if ((65535 & oe) != (oe >>> 16 ^ 65535)) { e.msg = "invalid stored block lengths", n.mode = V; break }
                                if (n.length = 65535 & oe, oe = 0, le = 0, n.mode = F, t === f) break e;
                            case F:
                                n.mode = O;
                            case O:
                                if (ue = n.length) {
                                    if (ue > ae && (ue = ae), ue > se && (ue = se), 0 === ue) break e;
                                    i.arraySet(te, ee, ne, ue, re), ae -= ue, ne += ue, se -= ue, re += ue, n.length -= ue;
                                    break
                                }
                                n.mode = B;
                                break;
                            case R:
                                for (; le < 14;) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if (n.nlen = 257 + (31 & oe), oe >>>= 5, le -= 5, n.ndist = 1 + (31 & oe), oe >>>= 5, le -= 5, n.ncode = 4 + (15 & oe), oe >>>= 4, le -= 4, n.nlen > 286 || n.ndist > 30) { e.msg = "too many length or distance symbols", n.mode = V; break }
                                n.have = 0, n.mode = j;
                            case j:
                                for (; n.have < n.ncode;) {
                                    for (; le < 3;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    n.lens[Ne[n.have++]] = 7 & oe, oe >>>= 3, le -= 3
                                }
                                for (; n.have < 19;) n.lens[Ne[n.have++]] = 0;
                                if (n.lencode = n.lendyn, n.lenbits = 7, Se = { bits: n.lenbits }, xe = o(l, n.lens, 0, 19, n.lencode, 0, n.work, Se), n.lenbits = Se.bits, xe) { e.msg = "invalid code lengths set", n.mode = V; break }
                                n.have = 0, n.mode = P;
                            case P:
                                for (; n.have < n.nlen + n.ndist;) {
                                    for (; Ee = n.lencode[oe & (1 << n.lenbits) - 1], ge = Ee >>> 16 & 255, ve = 65535 & Ee, !((_e = Ee >>> 24) <= le);) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    if (ve < 16) oe >>>= _e, le -= _e, n.lens[n.have++] = ve;
                                    else {
                                        if (16 === ve) {
                                            for (ze = _e + 2; le < ze;) {
                                                if (0 === ae) break e;
                                                ae--, oe += ee[ne++] << le, le += 8
                                            }
                                            if (oe >>>= _e, le -= _e, 0 === n.have) { e.msg = "invalid bit length repeat", n.mode = V; break }
                                            ke = n.lens[n.have - 1], ue = 3 + (3 & oe), oe >>>= 2, le -= 2
                                        } else if (17 === ve) {
                                            for (ze = _e + 3; le < ze;) {
                                                if (0 === ae) break e;
                                                ae--, oe += ee[ne++] << le, le += 8
                                            }
                                            le -= _e, ke = 0, ue = 3 + (7 & (oe >>>= _e)), oe >>>= 3, le -= 3
                                        } else {
                                            for (ze = _e + 7; le < ze;) {
                                                if (0 === ae) break e;
                                                ae--, oe += ee[ne++] << le, le += 8
                                            }
                                            le -= _e, ke = 0, ue = 11 + (127 & (oe >>>= _e)), oe >>>= 7, le -= 7
                                        }
                                        if (n.have + ue > n.nlen + n.ndist) { e.msg = "invalid bit length repeat", n.mode = V; break }
                                        for (; ue--;) n.lens[n.have++] = ke
                                    }
                                }
                                if (n.mode === V) break;
                                if (0 === n.lens[256]) { e.msg = "invalid code -- missing end-of-block", n.mode = V; break }
                                if (n.lenbits = 9, Se = { bits: n.lenbits }, xe = o(h, n.lens, 0, n.nlen, n.lencode, 0, n.work, Se), n.lenbits = Se.bits, xe) { e.msg = "invalid literal/lengths set", n.mode = V; break }
                                if (n.distbits = 6, n.distcode = n.distdyn, Se = { bits: n.distbits }, xe = o(c, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, Se), n.distbits = Se.bits, xe) { e.msg = "invalid distances set", n.mode = V; break }
                                if (n.mode = U, t === f) break e;
                            case U:
                                n.mode = Z;
                            case Z:
                                if (ae >= 6 && se >= 258) { e.next_out = re, e.avail_out = se, e.next_in = ne, e.avail_in = ae, n.hold = oe, n.bits = le, s(e, ce), re = e.next_out, te = e.output, se = e.avail_out, ne = e.next_in, ee = e.input, ae = e.avail_in, oe = n.hold, le = n.bits, n.mode === B && (n.back = -1); break }
                                for (n.back = 0; Ee = n.lencode[oe & (1 << n.lenbits) - 1], ge = Ee >>> 16 & 255, ve = 65535 & Ee, !((_e = Ee >>> 24) <= le);) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if (ge && 0 == (240 & ge)) {
                                    for (we = _e, ye = ge, be = ve; Ee = n.lencode[be + ((oe & (1 << we + ye) - 1) >> we)], ge = Ee >>> 16 & 255, ve = 65535 & Ee, !(we + (_e = Ee >>> 24) <= le);) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    oe >>>= we, le -= we, n.back += we
                                }
                                if (oe >>>= _e, le -= _e, n.back += _e, n.length = ve, 0 === ge) { n.mode = G; break }
                                if (32 & ge) { n.back = -1, n.mode = B; break }
                                if (64 & ge) { e.msg = "invalid literal/length code", n.mode = V; break }
                                n.extra = 15 & ge, n.mode = H;
                            case H:
                                if (n.extra) {
                                    for (ze = n.extra; le < ze;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    n.length += oe & (1 << n.extra) - 1, oe >>>= n.extra, le -= n.extra, n.back += n.extra
                                }
                                n.was = n.length, n.mode = q;
                            case q:
                                for (; Ee = n.distcode[oe & (1 << n.distbits) - 1], ge = Ee >>> 16 & 255, ve = 65535 & Ee, !((_e = Ee >>> 24) <= le);) {
                                    if (0 === ae) break e;
                                    ae--, oe += ee[ne++] << le, le += 8
                                }
                                if (0 == (240 & ge)) {
                                    for (we = _e, ye = ge, be = ve; Ee = n.distcode[be + ((oe & (1 << we + ye) - 1) >> we)], ge = Ee >>> 16 & 255, ve = 65535 & Ee, !(we + (_e = Ee >>> 24) <= le);) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    oe >>>= we, le -= we, n.back += we
                                }
                                if (oe >>>= _e, le -= _e, n.back += _e, 64 & ge) { e.msg = "invalid distance code", n.mode = V; break }
                                n.offset = ve, n.extra = 15 & ge, n.mode = Y;
                            case Y:
                                if (n.extra) {
                                    for (ze = n.extra; le < ze;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    n.offset += oe & (1 << n.extra) - 1, oe >>>= n.extra, le -= n.extra, n.back += n.extra
                                }
                                if (n.offset > n.dmax) { e.msg = "invalid distance too far back", n.mode = V; break }
                                n.mode = X;
                            case X:
                                if (0 === se) break e;
                                if (ue = ce - se, n.offset > ue) {
                                    if ((ue = n.offset - ue) > n.whave && n.sane) { e.msg = "invalid distance too far back", n.mode = V; break }
                                    ue > n.wnext ? (ue -= n.wnext, pe = n.wsize - ue) : pe = n.wnext - ue, ue > n.length && (ue = n.length), me = n.window
                                } else me = te, pe = re - n.offset, ue = n.length;
                                ue > se && (ue = se), se -= ue, n.length -= ue;
                                do { te[re++] = me[pe++] } while (--ue);
                                0 === n.length && (n.mode = Z);
                                break;
                            case G:
                                if (0 === se) break e;
                                te[re++] = n.length, se--, n.mode = Z;
                                break;
                            case W:
                                if (n.wrap) {
                                    for (; le < 32;) {
                                        if (0 === ae) break e;
                                        ae--, oe |= ee[ne++] << le, le += 8
                                    }
                                    if (ce -= se, e.total_out += ce, n.total += ce, ce && (e.adler = n.check = n.flags ? a(n.check, te, ce, re - ce) : r(n.check, te, ce, re - ce)), ce = se, (n.flags ? oe : ie(oe)) !== n.check) { e.msg = "incorrect data check", n.mode = V; break }
                                    oe = 0, le = 0
                                }
                                n.mode = $;
                            case $:
                                if (n.wrap && n.flags) {
                                    for (; le < 32;) {
                                        if (0 === ae) break e;
                                        ae--, oe += ee[ne++] << le, le += 8
                                    }
                                    if (oe !== (4294967295 & n.total)) { e.msg = "incorrect length check", n.mode = V; break }
                                    oe = 0, le = 0
                                }
                                n.mode = K;
                            case K:
                                xe = m;
                                break e;
                            case V:
                                xe = v;
                                break e;
                            case Q:
                                return w;
                            case J:
                            default:
                                return g
                        }
                        return e.next_out = re, e.avail_out = se, e.next_in = ne, e.avail_in = ae, n.hold = oe, n.bits = le, (n.wsize || ce !== e.avail_out && n.mode < V && (n.mode < W || t !== u)) && fe(e, e.output, e.next_out, ce - e.avail_out), he -= e.avail_in, ce -= e.avail_out, e.total_in += he, e.total_out += ce, n.total += ce, n.wrap && ce && (e.adler = n.check = n.flags ? a(n.check, te, ce, e.next_out - ce) : r(n.check, te, ce, e.next_out - ce)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === B ? 128 : 0) + (n.mode === U || n.mode === F ? 256 : 0), (0 === he && 0 === ce || t === u) && xe === p && (xe = y), xe
                    }, n.inflateEnd = function(e) { if (!e || !e.state) return g; var t = e.state; return t.window && (t.window = null), e.state = null, p }, n.inflateGetHeader = function(e, t) { var n; return e && e.state ? 0 == (2 & (n = e.state).wrap) ? g : (n.head = t, t.done = !1, p) : g }, n.inflateSetDictionary = function(e, t) { var n, i = t.length; return e && e.state ? 0 !== (n = e.state).wrap && n.mode !== I ? g : n.mode === I && r(1, t, i, 0) !== n.check ? v : fe(e, t, i, i) ? (n.mode = Q, w) : (n.havedict = 1, p) : g }, n.inflateInfo = "pako inflate (from Nodeca project)"
                }, { "../utils/common": 1, "./adler32": 3, "./crc32": 5, "./inffast": 7, "./inftrees": 9 }],
                9: [function(e, t, n) {
                    var i = e("../utils/common"),
                        r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0],
                        a = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78],
                        s = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0],
                        o = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
                    t.exports = function(e, t, n, l, h, c, u, d) {
                        var f, p, m, _, g, v, w, y, b, k = d.bits,
                            x = 0,
                            S = 0,
                            z = 0,
                            E = 0,
                            C = 0,
                            N = 0,
                            M = 0,
                            T = 0,
                            A = 0,
                            I = 0,
                            B = null,
                            L = 0,
                            D = new i.Buf16(16),
                            F = new i.Buf16(16),
                            O = null,
                            R = 0;
                        for (x = 0; x <= 15; x++) D[x] = 0;
                        for (S = 0; S < l; S++) D[t[n + S]]++;
                        for (C = k, E = 15; E >= 1 && 0 === D[E]; E--);
                        if (C > E && (C = E), 0 === E) return h[c++] = 20971520, h[c++] = 20971520, d.bits = 1, 0;
                        for (z = 1; z < E && 0 === D[z]; z++);
                        for (C < z && (C = z), T = 1, x = 1; x <= 15; x++)
                            if (T <<= 1, (T -= D[x]) < 0) return -1;
                        if (T > 0 && (0 === e || 1 !== E)) return -1;
                        for (F[1] = 0, x = 1; x < 15; x++) F[x + 1] = F[x] + D[x];
                        for (S = 0; S < l; S++) 0 !== t[n + S] && (u[F[t[n + S]]++] = S);
                        if (0 === e ? (B = O = u, v = 19) : 1 === e ? (B = r, L -= 257, O = a, R -= 257, v = 256) : (B = s, O = o, v = -1), I = 0, S = 0, x = z, g = c, N = C, M = 0, m = -1, _ = (A = 1 << C) - 1, 1 === e && A > 852 || 2 === e && A > 592) return 1;
                        for (;;) {
                            w = x - M, u[S] < v ? (y = 0, b = u[S]) : u[S] > v ? (y = O[R + u[S]], b = B[L + u[S]]) : (y = 96, b = 0), f = 1 << x - M, z = p = 1 << N;
                            do { h[g + (I >> M) + (p -= f)] = w << 24 | y << 16 | b | 0 } while (0 !== p);
                            for (f = 1 << x - 1; I & f;) f >>= 1;
                            if (0 !== f ? (I &= f - 1, I += f) : I = 0, S++, 0 == --D[x]) {
                                if (x === E) break;
                                x = t[n + u[S]]
                            }
                            if (x > C && (I & _) !== m) {
                                for (0 === M && (M = C), g += z, T = 1 << (N = x - M); N + M < E && !((T -= D[N + M]) <= 0);) N++, T <<= 1;
                                if (A += 1 << N, 1 === e && A > 852 || 2 === e && A > 592) return 1;
                                h[m = I & _] = C << 24 | N << 16 | g - c | 0
                            }
                        }
                        return 0 !== I && (h[g + I] = x - M << 24 | 64 << 16 | 0), d.bits = C, 0
                    }
                }, { "../utils/common": 1 }],
                10: [function(e, t, n) { t.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" } }, {}],
                11: [function(e, t, n) { t.exports = function() { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0 } }, {}],
                "/lib/inflate.js": [function(e, t, n) {
                    var i = e("./zlib/inflate"),
                        r = e("./utils/common"),
                        a = e("./utils/strings"),
                        s = e("./zlib/constants"),
                        o = e("./zlib/messages"),
                        l = e("./zlib/zstream"),
                        h = e("./zlib/gzheader"),
                        c = Object.prototype.toString;

                    function u(e) {
                        if (!(this instanceof u)) return new u(e);
                        this.options = r.assign({ chunkSize: 16384, windowBits: 0, to: "" }, e || {});
                        var t = this.options;
                        t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, 0 === t.windowBits && (t.windowBits = -15)), !(t.windowBits >= 0 && t.windowBits < 16) || e && e.windowBits || (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && 0 == (15 & t.windowBits) && (t.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new l, this.strm.avail_out = 0;
                        var n = i.inflateInit2(this.strm, t.windowBits);
                        if (n !== s.Z_OK) throw new Error(o[n]);
                        if (this.header = new h, i.inflateGetHeader(this.strm, this.header), t.dictionary && ("string" == typeof t.dictionary ? t.dictionary = a.string2buf(t.dictionary) : "[object ArrayBuffer]" === c.call(t.dictionary) && (t.dictionary = new Uint8Array(t.dictionary)), t.raw && (n = i.inflateSetDictionary(this.strm, t.dictionary)) !== s.Z_OK)) throw new Error(o[n])
                    }

                    function d(e, t) { var n = new u(t); if (n.push(e, !0), n.err) throw n.msg || o[n.err]; return n.result }
                    u.prototype.push = function(e, t) {
                        var n, o, l, h, u, d = this.strm,
                            f = this.options.chunkSize,
                            p = this.options.dictionary,
                            m = !1;
                        if (this.ended) return !1;
                        o = t === ~~t ? t : !0 === t ? s.Z_FINISH : s.Z_NO_FLUSH, "string" == typeof e ? d.input = a.binstring2buf(e) : "[object ArrayBuffer]" === c.call(e) ? d.input = new Uint8Array(e) : d.input = e, d.next_in = 0, d.avail_in = d.input.length;
                        do {
                            if (0 === d.avail_out && (d.output = new r.Buf8(f), d.next_out = 0, d.avail_out = f), (n = i.inflate(d, s.Z_NO_FLUSH)) === s.Z_NEED_DICT && p && (n = i.inflateSetDictionary(this.strm, p)), n === s.Z_BUF_ERROR && !0 === m && (n = s.Z_OK, m = !1), n !== s.Z_STREAM_END && n !== s.Z_OK) return this.onEnd(n), this.ended = !0, !1;
                            d.next_out && (0 !== d.avail_out && n !== s.Z_STREAM_END && (0 !== d.avail_in || o !== s.Z_FINISH && o !== s.Z_SYNC_FLUSH) || ("string" === this.options.to ? (l = a.utf8border(d.output, d.next_out), h = d.next_out - l, u = a.buf2string(d.output, l), d.next_out = h, d.avail_out = f - h, h && r.arraySet(d.output, d.output, l, h, 0), this.onData(u)) : this.onData(r.shrinkBuf(d.output, d.next_out)))), 0 === d.avail_in && 0 === d.avail_out && (m = !0)
                        } while ((d.avail_in > 0 || 0 === d.avail_out) && n !== s.Z_STREAM_END);
                        return n === s.Z_STREAM_END && (o = s.Z_FINISH), o === s.Z_FINISH ? (n = i.inflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === s.Z_OK) : o !== s.Z_SYNC_FLUSH || (this.onEnd(s.Z_OK), d.avail_out = 0, !0)
                    }, u.prototype.onData = function(e) { this.chunks.push(e) }, u.prototype.onEnd = function(e) { e === s.Z_OK && ("string" === this.options.to ? this.result = this.chunks.join("") : this.result = r.flattenChunks(this.chunks)), this.chunks = [], this.err = e, this.msg = this.strm.msg }, n.Inflate = u, n.inflate = d, n.inflateRaw = function(e, t) { return (t = t || {}).raw = !0, d(e, t) }, n.ungzip = d
                }, { "./utils/common": 1, "./utils/strings": 2, "./zlib/constants": 4, "./zlib/gzheader": 6, "./zlib/inflate": 8, "./zlib/messages": 10, "./zlib/zstream": 11 }]
            }, {}, [])("/lib/inflate.js")
        }).inflate),
        W = function(e) { if ("string" != typeof e) return e; try { if ((t = JSON.parse(e)).timestamp) return t } catch (e) {} try { var t; if ("v1" === (t = JSON.parse(G(e, { to: "string" }))).v) return t; throw new Error("These events were packed with packer " + t.v + " which is incompatible with current packer v1.") } catch (e) { throw console.error(e), new Error("Unknown data format.") } };

    function $(e) { let t = ""; return Object.keys(e).forEach(n => { t += `${n}: ${e[n]};` }), t }

    function K(e, t = 2) {
        const n = Math.pow(10, t - 1);
        if (e < n)
            for (e = String(e); String(n).length > e.length;) e = "0" + e;
        return e
    }! function(e, t) {
        void 0 === t && (t = {});
        var n = t.insertAt;
        if (e && "undefined" != typeof document) {
            var i = document.head || document.getElementsByTagName("head")[0],
                r = document.createElement("style");
            r.type = "text/css", "top" === n && i.firstChild ? i.insertBefore(r, i.firstChild) : i.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e))
        }
    }('body{margin:0}.replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:.05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("")}.replayer-mouse:after{content:"";display:inline-block;width:20px;height:20px;border-radius:10px;background:#4950f6;transform:translate(-10px,-10px);opacity:.3}.replayer-mouse.active:after{animation:a .2s ease-in-out 1}@keyframes a{0%{opacity:.3;width:20px;height:20px;border-radius:10px;transform:translate(-10px,-10px)}50%{opacity:.5;width:10px;height:10px;border-radius:5px;transform:translate(-5px,-5px)}}');
    const V = 1e3,
        Q = 60 * V,
        J = 60 * Q;

    function ee(e) {
        if (e <= 0) return "00:00";
        const t = Math.floor(e / J);
        e %= J;
        const n = Math.floor(e / Q);
        e %= Q;
        const i = Math.floor(e / V);
        return t ? `${K(t)}:${K(n)}:${K(i)}` : `${K(n)}:${K(i)}`
    }

    function te() { return document.fullscreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement }

    function ne(e) {
        v(this, e), this._state = t({}, e.data), this._intro = !!e.intro, this._fragment = function(e, t) {
            var n, l, p, _, g, v, w, y;

            function b() { e.set({ checked: l.checked }) }
            return { c() { n = o("div"), l = o("input"), p = h("\n  "), _ = o("label"), g = h(" "), v = o("span"), w = h(t.label), c(l, "change", b), d(l, "type", "checkbox"), l.id = t.id, l.disabled = t.disabled, l.className = "svelte-a6h7w7", _.htmlFor = t.id, _.className = "svelte-a6h7w7", v.className = "label svelte-a6h7w7", n.className = "switch svelte-a6h7w7", m(n, "disabled", t.disabled) }, m(e, i) { a(e, n, i), r(n, l), l.checked = t.checked, r(n, p), r(n, _), r(n, g), r(n, v), r(v, w), y = !0 }, p(e, t) { e.checked && (l.checked = t.checked), e.id && (l.id = t.id), e.disabled && (l.disabled = t.disabled), e.id && (_.htmlFor = t.id), e.label && f(w, t.label), e.disabled && m(n, "disabled", t.disabled) }, i(e, t) { y || this.m(e, t) }, o: i, d(e) { e && s(n), u(l, "change", b) } }
        }(this, this._state), e.target && (this._fragment.c(), this._mount(e.target, e.anchor)), this._intro = !0
    }
    t(ne.prototype, z);
    var ie = {
        loopTimer() {
            const e = this;
            this.timer = requestAnimationFrame(function t() {
                const { meta: n, isPlaying: i, replayer: r } = e.get();
                if (!i) return void(e.timer = null);
                const a = r.timer.timeOffset + r.getTimeOffset();
                e.set({ currentTime: a }), a < n.totalTime && requestAnimationFrame(t)
            })
        },
        play() {
            const { replayer: e, currentTime: t } = this.get();
            t > 0 ? e.resume(t) : (this.set({ isPlaying: !0 }), e.play(t))
        },
        pause() {
            const { replayer: e } = this.get();
            e.pause()
        },
        toggle() {
            const { isPlaying: e } = this.get();
            e ? this.pause() : this.play()
        },
        setSpeed(e) {
            const { replayer: t, currentTime: n, isPlaying: i } = this.get();
            t.pause(), t.setConfig({ speed: e }), this.set({ speed: e }), i && t.resume(n)
        },
        handleProgressClick(e) {
            const { meta: t, replayer: n, isPlaying: i, isSkipping: r } = this.get();
            if (r) return;
            const a = this.refs.progress.getBoundingClientRect();
            let s = (e.clientX - a.left) / a.width;
            s < 0 ? s = 0 : s > 1 && (s = 1);
            const o = t.totalTime * s;
            this.set({ currentTime: o }), n.play(o), i || n.pause()
        }
    };

    function re() {
        const { isPlaying: e } = this.get();
        e && this.pause()
    }

    function ae({ changed: e, current: t, previous: n }) {
        if (t.replayer && !n) {
            if (window.replayer = t.replayer, setTimeout(() => { this.set({ isPlaying: !0 }) }, 0), t.replayer.play(0), !t.autoPlay) {
                let e = !1;
                t.replayer.on("fullsnapshot-rebuilded", () => { e || (e = !0, t.replayer.pause()) })
            }
            t.replayer.on("pause", () => { this.set({ isPlaying: !1 }) }), t.replayer.on("resume", () => { this.set({ isPlaying: !0 }) }), t.replayer.on("finish", () => { this.timer = null, this.set({ isPlaying: !1, currentTime: 0 }) }), t.replayer.on("skip-start", e => { e.isSkipping = !0, this.set(e) }), t.replayer.on("skip-end", e => { e.isSkipping = !1, this.set(e) })
        }
        e.isPlaying && t.isPlaying && !this.timer && this.loopTimer(), e.skipInactive && t.replayer.setConfig({ skipInactive: t.skipInactive })
    }

    function se(e) {
        const { component: t, ctx: n } = this._svelte;
        t.setSpeed(n.s)
    }

    function oe(e, t, n) { const i = Object.create(e); return i.s = t[n], i }

    function le(e, t) { var n, i, r = t.showController && he(e, t); return { c() { r && r.c(), n = document.createComment("") }, m(e, t) { r && r.m(e, t), a(e, n, t), i = !0 }, p(t, i) { i.showController ? (r ? r.p(t, i) : (r = he(e, i)) && r.c(), r.i(n.parentNode, n)) : r && r.o(function() { r.d(1), r = null }) }, i(e, t) { i || this.m(e, t) }, o(e) { i && (r ? r.o(e) : e(), i = !1) }, d(e) { r && r.d(e), e && s(n) } } }

    function he(e, t) {
        var n, i, l, d, _, g, v, w, y, b, k, x, S, z, E, C, N, M, T, A, I = ee(t.currentTime),
            B = ee(t.meta.totalTime),
            L = {};

        function D(t) { e.handleProgressClick(t) }

        function F(e) { return e.isPlaying ? ue : ce }
        var O = F(t),
            R = O(e, t);

        function j(t) { e.toggle() }
        for (var P = [1, 2, 4, 8], U = [], Z = 0; Z < P.length; Z += 1) U[Z] = de(e, oe(t, P, Z));
        var H = { id: "skip", disabled: t.isSkipping, label: "skip inactive" };
        void 0 !== t.skipInactive && (H.checked = t.skipInactive, L.checked = !0);
        var q = new ne({ root: e.root, store: e.store, data: H, _bind(t, n) { var i = {};!L.checked && t.checked && (i.skipInactive = n.checked), e._set(i), L = {} } });

        function Y(t) { e.fire("fullscreen") }
        return e.root._beforecreate.push(() => { q._bind({ checked: 1 }, q.get()) }), {
            c() {
                n = o("div"), i = o("div"), l = o("span"), d = h(I), _ = h("\n    "), g = o("div"), v = o("div"), w = h("\n      "), y = o("div"), b = h("\n    "), k = o("span"), x = h(B), S = h("\n  "), z = o("div"), E = o("button"), R.c(), C = h("\n    ");
                for (var e = 0; e < U.length; e += 1) U[e].c();
                N = h("\n    "), q._fragment.c(), M = h("\n    "), (T = o("button")).innerHTML = '<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4 0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0 224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48 48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48 48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4 68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z" p-id="1286"></path></svg>', l.className = "rr-timeline__time svelte-1cgfpn0", v.className = "rr-progress__step svelte-1cgfpn0", p(v, "width", t.percentage), y.className = "rr-progress__handler svelte-1cgfpn0", p(y, "left", t.percentage), c(g, "click", D), g.className = "rr-progress svelte-1cgfpn0", m(g, "disabled", t.isSkipping), k.className = "rr-timeline__time svelte-1cgfpn0", i.className = "rr-timeline svelte-1cgfpn0", c(E, "click", j), E.className = "svelte-1cgfpn0", c(T, "click", Y), T.className = "svelte-1cgfpn0", z.className = "rr-controller__btns svelte-1cgfpn0", n.className = "rr-controller svelte-1cgfpn0"
            },
            m(t, s) {
                a(t, n, s), r(n, i), r(i, l), r(l, d), r(i, _), r(i, g), r(g, v), e.refs.step = v, r(g, w), r(g, y), e.refs.handler = y, e.refs.progress = g, r(i, b), r(i, k), r(k, x), r(n, S), r(n, z), r(z, E), R.m(E, null), r(z, C);
                for (var o = 0; o < U.length; o += 1) U[o].m(z, null);
                r(z, N), q._mount(z, null), r(z, M), r(z, T), A = !0
            },
            p(n, i) {
                if (t = i, A && !n.currentTime || I === (I = ee(t.currentTime)) || f(d, I), A && !n.percentage || (p(v, "width", t.percentage), p(y, "left", t.percentage)), n.isSkipping && m(g, "disabled", t.isSkipping), A && !n.meta || B === (B = ee(t.meta.totalTime)) || f(x, B), O !== (O = F(t)) && (R.d(1), (R = O(e, t)).c(), R.m(E, null)), n.isSkipping || n.speed) {
                    P = [1, 2, 4, 8];
                    for (var r = 0; r < P.length; r += 1) {
                        const i = oe(t, P, r);
                        U[r] ? U[r].p(n, i) : (U[r] = de(e, i), U[r].c(), U[r].m(z, N))
                    }
                    for (; r < U.length; r += 1) U[r].d(1);
                    U.length = P.length
                }
                var a = {};
                n.isSkipping && (a.disabled = t.isSkipping), !L.checked && n.skipInactive && (a.checked = t.skipInactive, L.checked = void 0 !== t.skipInactive), q._set(a), L = {}
            },
            i(e, t) { A || this.m(e, t) },
            o(e) { A && (q && q._fragment.o(e), A = !1) },
            d(t) {
                t && s(n), e.refs.step === v && (e.refs.step = null), e.refs.handler === y && (e.refs.handler = null), u(g, "click", D), e.refs.progress === g && (e.refs.progress = null), R.d(), u(E, "click", j),
                    function(e, t) { for (var n = 0; n < e.length; n += 1) e[n] && e[n].d(t) }(U, t), q.destroy(), u(T, "click", Y)
            }
        }
    }

    function ce(e, t) { var n, i; return { c() { n = l("svg"), d(i = l("path"), "d", "M170.65984 896l0-768 640 384zM644.66944 512l-388.66944-233.32864 0 466.65728z"), d(n, "class", "icon"), d(n, "viewBox", "0 0 1024 1024"), d(n, "version", "1.1"), d(n, "xmlns", "http://www.w3.org/2000/svg"), d(n, "xmlns:xlink", "http://www.w3.org/1999/xlink"), d(n, "width", "16"), d(n, "height", "16") }, m(e, t) { a(e, n, t), r(n, i) }, d(e) { e && s(n) } } }

    function ue(e, t) { var n, i; return { c() { n = l("svg"), d(i = l("path"), "d", "M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888 90.50112t-90.50112 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224 37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888 90.50112t-90.50112 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224 37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"), d(n, "class", "icon"), d(n, "viewBox", "0 0 1024 1024"), d(n, "version", "1.1"), d(n, "xmlns", "http://www.w3.org/2000/svg"), d(n, "xmlns:xlink", "http://www.w3.org/1999/xlink"), d(n, "width", "16"), d(n, "height", "16") }, m(e, t) { a(e, n, t), r(n, i) }, d(e) { e && s(n) } } }

    function de(e, t) { var n, i, l; return { c() { n = o("button"), i = h(t.s), l = h("x"), n._svelte = { component: e, ctx: t }, c(n, "click", se), n.disabled = t.isSkipping, n.className = "svelte-1cgfpn0", m(n, "active", t.s === t.speed && !t.isSkipping) }, m(e, t) { a(e, n, t), r(n, i), r(n, l) }, p(e, i) { t = i, n._svelte.ctx = t, e.isSkipping && (n.disabled = t.isSkipping), (e.speed || e.isSkipping) && m(n, "active", t.s === t.speed && !t.isSkipping) }, d(e) { e && s(n), u(n, "click", se) } } }

    function fe(e) { v(this, e), this.refs = {}, this._state = t({ currentTime: 0, isPlaying: !1, isSkipping: !1, skipInactive: !0, speed: 1 }, e.data), this._recompute({ replayer: 1, currentTime: 1, meta: 1 }, this._state), this._intro = !!e.intro, this._handlers.update = [ae], this._handlers.destroy = [re], this._fragment = le(this, this._state), this.root._oncreate.push(() => { this.fire("update", { changed: n({}, this._state), current: this._state }) }), e.target && (this._fragment.c(), this._mount(e.target, e.anchor), g(this)), this._intro = !0 }
    t(fe.prototype, z), t(fe.prototype, ie), fe.prototype._recompute = function(e, t) { e.replayer && this._differs(t.meta, t.meta = function({ replayer: e }) { return e.getMetaData() }(t)) && (e.meta = !0), (e.currentTime || e.meta) && this._differs(t.percentage, t.percentage = function({ currentTime: e, meta: t }) { return `${100 * Math.min(1, e / t.totalTime)}%` }(t)) && (e.percentage = !0) };
    const pe = 80;
    var me = {
        updateScale(e, t) {
            const { width: n, height: i } = this.get(), r = n / t.width, a = i / t.height;
            e.style.transform = `scale(${Math.min(r, a)})` + "translate(-50%, -50%)"
        },
        fullscreen() {
            var e;
            this.refs.player && (te() ? document.exitFullscreen ? document.exitFullscreen() : document.mozExitFullscreen ? document.mozExitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : document.msExitFullscreen && document.msExitFullscreen() : (e = this.refs.player).requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : e.msRequestFullscreen && e.msRequestFullscreen())
        },
        addEventListener(e, t) {
            const { replayer: n } = this.get();
            n.on(e, t)
        },
        addEvent(e) { replayer.addEvent(e) }
    };

    function _e() {
        const { events: e, triggerFocus: t } = this.get(), n = new X(e, { speed: 1, root: this.refs.frame, skipInactive: !0, showWarning: !0, triggerFocus: t, unpackFn: W });
        var i;
        n.on("resize", e => this.updateScale(n.wrapper, e)), this.set({ replayer: n }), this.fullscreenListener = (i = (() => {
            te() ? setTimeout(() => {
                const { width: e, height: t } = this.get();
                this._width = e, this._height = t;
                const i = { width: this.refs.player.offsetWidth, height: this.refs.player.offsetHeight - pe };
                this.set(i), this.updateScale(n.wrapper, { width: n.iframe.offsetWidth, height: n.iframe.offsetHeight })
            }, 0) : (this.set({ width: this._width, height: this._height }), this.updateScale(n.wrapper, { width: n.iframe.offsetWidth, height: n.iframe.offsetHeight }))
        }), document.addEventListener("fullscreenchange", i), document.addEventListener("webkitfullscreenchange", i), document.addEventListener("mozfullscreenchange", i), document.addEventListener("MSFullscreenChange", i), () => { document.removeEventListener("fullscreenchange", i), document.removeEventListener("webkitfullscreenchange", i), document.removeEventListener("mozfullscreenchange", i), document.removeEventListener("MSFullscreenChange", i) })
    }

    function ge() { this.fullscreenListener && this.fullscreenListener() }

    function ve(e, t) {
        var n, i = { replayer: t.replayer, showController: t.showController, autoPlay: t.autoPlay, skipInactive: t.skipInactive },
            r = new fe({ root: e.root, store: e.store, data: i });
        return r.on("fullscreen", function(t) { e.fullscreen() }), {
            c() { r._fragment.c() },
            m(e, t) { r._mount(e, t), n = !0 },
            p(e, t) {
                var n = {};
                e.replayer && (n.replayer = t.replayer), e.showController && (n.showController = t.showController), e.autoPlay && (n.autoPlay = t.autoPlay), e.skipInactive && (n.skipInactive = t.skipInactive), r._set(n)
            },
            i(e, t) { n || this.m(e, t) },
            o(e) { n && (r && r._fragment.o(e), n = !1) },
            d(e) { r.destroy(e) }
        }
    }

    function we(e) {
        var i, l, c, u, d, f, p;
        v(this, e), this.refs = {}, this._state = t({ showController: !0, width: 1024, height: 576, events: [], autoPlay: !0, skipInactive: !0, replayer: null, triggerFocus: !0 }, e.data), this._recompute({ width: 1, height: 1, showController: 1 }, this._state), this._intro = !!e.intro, this._handlers.destroy = [ge], this._fragment = (i = this, l = this._state, p = l.replayer && ve(i, l), { c() { c = o("div"), u = o("div"), d = h("\n  "), p && p.c(), u.className = "rr-player__frame svelte-1wetjm2", u.style.cssText = l.style, c.className = "rr-player svelte-1wetjm2", c.style.cssText = l.playerStyle }, m(e, t) { a(e, c, t), r(c, u), i.refs.frame = u, r(c, d), p && p.m(c, null), i.refs.player = c, f = !0 }, p(e, t) { f && !e.style || (u.style.cssText = t.style), t.replayer ? (p ? p.p(e, t) : (p = ve(i, t)) && p.c(), p.i(c, null)) : p && p.o(function() { p.d(1), p = null }), f && !e.playerStyle || (c.style.cssText = t.playerStyle) }, i(e, t) { f || this.m(e, t) }, o(e) { f && (p ? p.o(e) : e(), f = !1) }, d(e) { e && s(c), i.refs.frame === u && (i.refs.frame = null), p && p.d(), i.refs.player === c && (i.refs.player = null) } }), this.root._oncreate.push(() => { _e.call(this), this.fire("update", { changed: n({}, this._state), current: this._state }) }), e.target && (this._fragment.c(), this._mount(e.target, e.anchor), g(this)), this._intro = !0
    }
    return t(we.prototype, z), t(we.prototype, me), we.prototype._recompute = function(e, t) {
        (e.width || e.height) && this._differs(t.style, t.style = function({ width: e, height: t }) { return $({ width: `${e}px`, height: `${t}px` }) }(t)) && (e.style = !0), (e.width || e.height || e.showController) && this._differs(t.playerStyle, t.playerStyle = function({ width: e, height: t, showController: n }) { return $({ width: `${e}px`, height: `${t + (n ? pe : 0)}px` }) }(t)) && (e.playerStyle = !0)
    }, we
}();

var zkjInfo = {
    appCode: '6c17344e59dd439cb1749b08cd49aea2',
    sessionUnique: '',
    appRuleInfo: {},
    curRuleInfo: {},
    serverRules: "http://139.129.164.252:9543/backtrack/api/getRule",
    uploadUrl: 'http://139.129.164.252:9543/backtrack/api/trackUpload',
    trackFillUp: 'http://139.129.164.252:9543/backtrack/api/trackFillup',
    productName: '',
    backtrackIP: navigator ? navigator.userAgent : '安卓微信'
};
var date = new Date();
var urlTime;

var stampStr = localStorage.getItem('zkjinTraceStamp');
var curStamp;
if (stampStr != null && stampStr != undefined && stampStr != '') {
    try {
        curStamp = JSON.parse(stampStr)
        if (date.getTime() - curStamp >= 300000) {
            curStamp = date.getTime();
        }
    } catch (e) {
        curStamp = date.getTime();
    }
    localStorage.setItem("zkjinTraceStamp", curStamp)
} else {
    curStamp = date.getTime();
    localStorage.setItem("zkjinTraceStamp", curStamp)
}

zkjInfo.sessionUnique = curStamp;
//zkjInfo.sessionUnique = "sessionUnique" +date.getDate()+" "+ date.getHours();//new Date().getTime();
window.onload = function() {
        trackBack.getRuleInfo(() => {
            // trackBack.doScreenShot({
            //                address:zkjInfo.curRuleInfo,
            //                ruleId:zkjInfo.curRuleInfo.id,
            //                id:''//ruleTrackId
            //            })    
        })

    }
    //传递当前产品名称
function setSessionUnique(val) {

    if (val.productName != null) {
        zkjInfo.productName = val.productName;
    }
    console.log(setSessionUnique)
    console.log(val)
    zkjInfo.sessionUnique = ''
    if (val.userTel != null && val.userTel != '') {
        zkjInfo.sessionUnique = val.userTel;
    }
    if (val.salesCode != null && val.salesCode != '') {
        zkjInfo.sessionUnique = val.salesCode;
    }
    console.log("zkjInfo.sessionUnique" + zkjInfo.sessionUnique)
    zkjInfo.sessionUnique = zkjInfo.sessionUnique + "_" + (new Date()).getTime();
    //zkjInfo.sessionUnique = val;
}

var trackBack = function() {

    // var videoFlag = true;
    function getRuleInfo(callback) {
        videoFlag = true;
        //获取规则
        $.post(zkjInfo.serverRules, { applicationCode: zkjInfo.appCode },
            (res) => {
                if (res.code == 0) {
                    if (zkjInfo.appRuleInfo) {
                        localStorage.setItem(zkjInfo.appCode, JSON.stringify(res));
                    }
                    handleRulesData(res, 2) //2 需要录屏
                    console.log(res);
                    if (zkjInfo.curRuleInfo) {
                        if (callback)
                            callback()
                    }
                }
            });
    }
    this.getRuleInfo = getRuleInfo;
    let events = [];
    let r;


    function handleRulesData(data, type) {

        if (!data) {
            data = JSON.parse(localStorage.getItem(zkjInfo.appCode));
            if (!data) {
                console.log("录屏规则没请求成功")
                return false
            }
        }
        var curEl;
        if (data && data.code == null)
            return
        if (data && data.code == 0 && data.value) {
            zkjInfo.appRuleInfo = data.value;
            //alert(window.location.href)
            let curUrl = window.location.href.split("?")[0];
            let urlArr = []
            zkjInfo.appRuleInfo.forEach((item) => {
                urlArr.push(item.address);
            })
            if (urlArr.indexOf(curUrl) > -1) {
                zkjInfo.curRuleInfo = zkjInfo.appRuleInfo[urlArr.indexOf(curUrl)];
            } else {
                zkjInfo.curRuleInfo = {}
            }
        }
        //当前网址规则列表
        if (zkjInfo.curRuleInfo.ruleTrackList) {
            zkjInfo.curRuleInfo.ruleTrackList.forEach(item => {
                if (item.trackType == 1) { //1 屏幕图片截取  2 视频录制
                    curEl = findElByXpath(item.address)[0];
                    if (curEl) {
                        if (curEl.trackBackFun == null) {
                            curEl.trackBackFun = () => {
                                doScreenShot(item)
                            };
                            curEl.addEventListener('click', curEl.trackBackFun);
                        } else {
                            console.log('has reged...');
                        }
                        //eventList = $._data(curEl.get(0), 'events');
                        //console.log(eventList)
                    }
                } else {
                    console.log("视频录制");

                }
            })
        }

        //视频录制
        if (zkjInfo.curRuleInfo.trackType == 2 && type == 2) {

            console.log("视频录制开始");
            if (urlTime) {
                let videoItem = localStorage.getItem("item");
                let videoEvents = localStorage.getItem("events");
                this.doVideoJson(videoItem, videoEvents);
                clearInterval(urlTime);
                events = [];
            }
            let curUrl = window.location.href.split("?")[0];
            localStorage.setItem("item", JSON.stringify(zkjInfo.curRuleInfo))
            localStorage.setItem("curUrl", curUrl)

            r = rrweb.record({
                emit(event) {

                    events.push(event);
                    let eventsStorage = JSON.stringify(events);
                    eventsStorage = eventsStorage.replace(/0.53/g, '0');
                    eventsStorage = eventsStorage.replace(/.van-loading {/g, '.van-loading { display:none;');
                    eventsStorage = eventsStorage.replace(/.van-icon-clear::before {/g, '.van-icon-clear::before { display:none;');
                    //wangxiao添加的逻辑
                    eventsStorage = eventsStorage.replace(/.van-toast {/g, '.van-toast { display:none !important;')
                    localStorage.setItem("events", eventsStorage)
                },
            });


            urlTime = setInterval(() => {
                urlUpload()
                console.log("9999993");
            }, 1500);

        }



    }

    this.regTrackEl = handleRulesData;

    function findElByXpath(STR_XPATH) {
        var xresult = document.evaluate(STR_XPATH, document, null, XPathResult.ANY_TYPE, null);
        var xnodes = [];
        var xres;
        while (xres = xresult.iterateNext()) {
            xnodes.push(xres);
        }
        return xnodes;
    }

    function dataURLtoBlob(baseurl) {
        let arr = baseurl.split(','),
            mime = arr[0].match(/:(.*?);/)[1],
            bstr = atob(arr[1]),
            n = bstr.length,
            u8arr = new Uint8Array(n);
        console.log('mime' + mime)

        while (n--) {
            u8arr[n] = bstr.charCodeAt(n);
        }
        return new Blob([u8arr], {
            type: mime
        });
    }

    //将blob转换成file
    function blobToFile(theBlob, fileName) {
        theBlob.lastModifiedDate = new Date();
        theBlob.name = fileName;
        return theBlob;
    }

    function sendInsuranceInfo(info, cb) {
        //zkjInfo.trackFillUp
        var fd = new FormData();
        fd.append('insuranceNo', info.insuranceNo);
        fd.append('sessionUnique', zkjInfo.sessionUnique)
        $.ajax({
            url: zkjInfo.trackFillUp,
            type: 'POST',
            datatype: 'text',
            data: fd,
            cache: false,
            traditional: true,
            contentType: false,
            processData: false,
            success: function(data) {
                if (cb != null) {
                    cb(data)
                }
            },
            error: function(e) {
                if (cb != null) {
                    cb(e)
                }
            }
        });
    }
    this.sendInsuranceInfo = sendInsuranceInfo

    function sendReq(blobData, item, mediaType) {

        //http://172.17.46.94:3000/file_upload
        //http://139.129.164.252:9543/backtrack/api/trackUpload
        var fd = new FormData();
        if (mediaType != 2) {
            var fileName = new Date().getTime() + ".jpg"
            var file = new File([blobData], fileName)
            fd.append('mediaType', "1")
            fd.append('file', file);
            fd.append('filename', fileName)
            fd.append('ruleId', item.ruleId)
        } else {
            //上传录屏

            item = JSON.parse(item);
            var events = localStorage.getItem("events", events);
            fd.append('mediaType', "2");
            fd.append('videoJson', events)
            fd.append('ruleId', item.id)
        }
        var date = new Date()

        fd.append('backtrackIP', zkjInfo.backtrackIP)
        fd.append('applicationCode', zkjInfo.appCode)
            //fd.append('address',window.locationref)
        fd.append('address', item.address)
        fd.append('sessionUnique', zkjInfo.sessionUnique)
        fd.append('ruleTrackId', item.id)

        if (zkjInfo.productName)
            fd.append('productName', zkjInfo.productName);
        fd.append('occurTime', date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds())

        $.ajax({
            url: zkjInfo.uploadUrl,
            type: 'POST',
            datatype: 'json',
            data: fd,
            cache: false,
            traditional: true,
            contentType: false,
            processData: false,
            success: function(data) {},
            error: function() {}
        });
    }

    function doScreenShot(item) {
        console.log(item)
        html2canvas(document.body).then(canvas => {
            var strDataURI = canvas.toDataURL("image/jpeg");
            var blobData = dataURLtoBlob(strDataURI)
            sendReq(blobData, item)
        })
    }
    this.doScreenShot = doScreenShot

    function doVideoJson(item) {
        sendReq("", item, 2)
    }
    this.doVideoJson = doVideoJson

    //判断当前网址和录屏网址是否一致，不一致则上传 
    function urlUpload() {
        console.log('提交');
        let curUrl = window.location.href.split("?")[0];
        let videoItem = localStorage.getItem("item");
        let videoEvents = localStorage.getItem("events");
        //this.doVideoJson(videoItem, videoEvents);
        // debugger
        if (localStorage.getItem("curUrl") && curUrl != localStorage.getItem("curUrl") && events.length > 0) {
            this.doVideoJson(videoItem, videoEvents);
            clearInterval(urlTime);
            events = [];
        }
    }
    this.urlUpload = urlUpload
    return this;
}()

window.trackBack = trackBack;